Notifies user about templates which could be generated.
@param array $templatesNames
@since 2.0.4
978298
protected function notifyTemplatesCanBeGenerated($templatesNames)
    {
        $this->stdout("Template files path: ", Console::FG_YELLOW);
        $this->stdout(Yii::getAlias($this->templatePath) . "\n\n", Console::FG_GREEN);

        foreach ($templatesNames as $name) {
            $this->stdout("\t* " . $name . "\n", Console::FG_GREEN);
        }

        $this->stdout("\n");
    }
770958
public function trackUsedPrefixes( $prefixes )  {
		if ( !is_array( $prefixes ) ) {
			$prefixes = $this->matchPrefixes( $prefixes );
		}

		$this->usedPrefixes = array_merge( $this->usedPrefixes, $prefixes );
	}
512304
public function saveTemplate($template_name, array $template_fields = [ ]) {
        $data = $template_fields;
        $data['template'] = $template_name;
        return $this->apiPost('template', $data);
    }
64665
protected function setTemplateData(array $overrides = [])
    {
        if (empty($overrides['template_data'])) {
            $this->templateData = [];
        } else {
            $this->templateData = $overrides['template_data'];
            $overrides = array_diff_key($overrides, ['template_data' => []]);
        }

        return $overrides;
    }
1168678
private function publishTemplates()
    {
        if (!$this->fileSystem->isDirectory(getcwd().'/resources/crudmaker')) {
            $this->copyDirectory(__DIR__.'/../Templates/Lumen', getcwd().'/resources/crudmaker');
            $this->info("\n\nLumen templates files have been published");
        } else {
            $this->error('Lumen templates files has already been published');
        }
    }
241229
public function setTemplate($template)
	{
		if (!($template instanceof Template))
		{
			$template = new Template($template);
		}

		$this->template = $template;
	}
1220137
protected function renderOutput($templates)
    {
        $html = '';

        if (!$this->isInternalRoute()) {

            if (!is_array($templates)) {
                $templates = array('region_content' => (string) $templates);
            }

            $templates = array_merge($this->templates, $templates);

            $layout = $templates['layout'];
            unset($templates['layout']);

            $body = $data = $this->data;

            foreach ($templates as $id => $template) {
                if (strpos($id, 'region_') === 0) {
                    $body[$id] = $this->renderRegion($id, $template);
                }
            }

            $data['_head'] = $data['_body'] = '';

            if (!empty($templates['head'])) {
                $data['_head'] = $this->render($templates['head'], $this->data);
            }

            if (!empty($templates['body'])) {
                $data['_body'] = $this->render($templates['body'], $body);
            }

            $html = $this->render($layout, $data, false);
        }

        $this->hook->attach('template.output', $html, $this);
        return $html;
    }
1013832
function templateFile( $templateName )
    {
        if ( isset( $this->Templates[$templateName] ) )
        {
            return $this->Templates[$templateName]['filepath'];
        }
        return false;
    }
357859
public function addNamespacePrefixes(array $prefixes) : void
    {
        $this->prefixes = array_merge($this->prefixes, $prefixes);
        $this->paths    = array_merge($this->paths, array_keys($prefixes));
    }
32234
public function getTemplate($name, $templateSetName)
    {
        if (
            isset($this->templateSet[$templateSetName]) &&
            isset($this->templateSet[$templateSetName]['templates']) &&
            isset($this->templateSet[$templateSetName]['templates'][$name])
        ) {
            return $this->templateSet[$templateSetName]['templates'][$name];
        }

        throw new NonExistingTemplateException();
    }
385988
public function setTemplatePathAndFilename($templatePathAndFilename)
    {
        $this->baseRenderingContext->getTemplatePaths()->setTemplatePathAndFilename($templatePathAndFilename);

        $partialRootPaths = $this->baseRenderingContext->getTemplatePaths()->getPartialRootPaths();
        $layoutRootPaths = $this->baseRenderingContext->getTemplatePaths()->getLayoutRootPaths();
        array_unshift($partialRootPaths, Files::concatenatePaths([dirname($templatePathAndFilename), 'Partials']));
        array_unshift($layoutRootPaths, Files::concatenatePaths([dirname($templatePathAndFilename), 'Layouts']));
        $this->baseRenderingContext->getTemplatePaths()->setPartialRootPaths($partialRootPaths);
        $this->baseRenderingContext->getTemplatePaths()->setLayoutRootPaths($layoutRootPaths);
    }
460801
public function replaceTemplateTypesWithArgTypes(array $template_types)
    {
        if ($this->params) {
            foreach ($this->params as $param) {
                if (!$param->type) {
                    continue;
                }

                $param->type->replaceTemplateTypesWithArgTypes($template_types);
            }
        }

        if ($this->return_type) {
            $this->return_type->replaceTemplateTypesWithArgTypes($template_types);
        }
    }
825815
public function display($templates) {
        global $OUTPUT;
        if (empty($templates)) {
            echo $OUTPUT->box(get_string('no_templates_available_yet', 'feedback'),
                             'generalbox boxaligncenter');
            return;
        }

        $this->setup();
        $strdeletefeedback = get_string('delete_template', 'feedback');

        foreach ($templates as $template) {
            $data = array();
            $data[] = format_string($template->name);
            $url = new moodle_url($this->baseurl, array('deletetempl' => $template->id, 'sesskey' => sesskey()));

            $deleteaction = new confirm_action(get_string('confirmdeletetemplate', 'feedback'));
            $data[] = $OUTPUT->action_icon($url, new pix_icon('t/delete', $strdeletefeedback), $deleteaction);
            $this->add_data($data);
        }
        $this->finish_output();
    }
885826
public function getPossibleViewFilesFromTemplates($templates)
    {
        return call_user_func_array('array_merge', array_map(function ($template) {
            return array_map(function ($extension) use ($template) {
                return str_replace('.', '/', $template).'.'.$extension;
            }, $this->extensions);
        }, $templates));
    }
139145
public function template_hierarchy( $templates ) {

		$this->type = substr( current_filter(), 0, - 19 ); // Trim '_template_hierarchy' from end.

		$twig_templates = [];

		foreach ( $templates as $php_template ) {
			if ( '.php' === substr( $php_template, - 4 ) ) {
				$twig_templates[] = substr( $php_template, 0, - 4 ) . '.twig';
			}
		}

		return array_merge( $twig_templates, $templates );
	}
811371
public static function fromArray(array $templates): Templates
    {
        // No templates. Nothing to do.
        if (empty($templates)) {
            return new static();
        }

        $result = new static();

        foreach ($templates as $index => $template) {
            $result->add(new Template($template), $index);
        }

        return $result;
    }
1202206
protected function loadTemplates()
    {
        $templates = $this->templatesObjectBackend->loadObject();
        if (!is_array($templates)) {
            $templates = array();
        }
        
        $this->templates = $templates;
    }