Get the available templates

@param   string  app  'frontend' | 'backend'

@return  array
424038
function getTemplates(app) {
	var results = [];

	if (extensions && extensions.hasOwnProperty('templates')
		&& extensions.templates.hasOwnProperty(app)
	) {
		var sourceArray = extensions.templates[app];

		for (index = 0; index < sourceArray.length; ++index) {
		    results.push(app + '.' + sourceArray[index]);
		}
	}

	return results;
}
1366228
private function getTemplateList()
    {
        $templates = $this->getAvailableTemplates($this->bundle);

        $types = array();
        foreach ($templates as $key => $template) {
            $types[$key] = $template['name'];
        }

        return $types;
    }
1107185
function loadTemplates()
    {
        $result[0] = array();
        $result[1] = array();
        $templates = Templates::getInstance();
        $list = $templates->enum();
        $result[0]= array_values($list);
        $result[1]= array_keys($list);
        return $result;
    }
1136769
public function getTemplates($key)
    {
        /** @var EmailTemplateTranslation[] $templates */
        if ($templates = EmailTemplateTranslation::findAll([
            'template_id' => EmailTemplate::getIdByKey($key)
        ])) {
            return Template::buildTemplates($templates);
        }

        return null;
    }
851804
public function bindings($app)
	{
		$app->bind('CoandaCMS\Coanda\Urls\Repositories\UrlRepositoryInterface', 'CoandaCMS\Coanda\Urls\Repositories\Eloquent\EloquentUrlRepository');

		$search_provider = $this->config->get('coanda::coanda.search_provider');

		if (class_exists($search_provider))
		{
			$app->bind('CoandaCMS\Coanda\Search\CoandaSearchProvider', $search_provider);
		}
		else
		{
			$app->bind('CoandaCMS\Coanda\Search\CoandaSearchProvider', 'CoandaCMS\Coanda\Search\Basic\CoandaBasicSearchProvider');
		}

		// Let the module output any bindings
		foreach ($this->modules as $module)
		{
			$module->bindings($app);
		}
	}
100656
public function getArrguments()
    {
        return [
            'model-name' => $this->modelName,
            '--resource-file' => $this->resourceFile,
            '--views-directory' => $this->viewsDirectory,
            '--routes-prefix' => $this->prefix,
            '--language-filename' => $this->languageFileName,
            '--layout-name' => $this->layout,
            '--template-name' => $this->template,
            '--force' => $this->force,
        ];
    }
1157007
protected function getDependencyTemplateResources()
    {
        $templateResources = [];

        // Run through all component dependencies
        foreach ($this->dependencies as $dependency) {
            $templateResources[] = $this->objectManager->get($dependency)->getPreviewTemplateResources();
        }

        return $templateResources;
    }
875100
private function loadTemplate()
    {
        return [
            0 => $this->template[0] != '' ? file_get_contents($this->template[0]) : '',
            1 => $this->template[1] != '' ? file_get_contents($this->template[1]) : '',
            2 => $this->template[2] != '' ? file_get_contents($this->template[2]) : '',
        ];
    }
1039407
private function _getTemplateList()
    {
        $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
        sort($dirlist);
        foreach ($dirlist as $file) {
            $tpl_ext = substr($file, strlen($file) - 4);
            $tpl_name = substr($file, 0, strlen($file) - 4);
            if ($tpl_ext === ".css") {
                if (preg_match("/(\S+)_bootstrap$/", $tpl_name, $ar_buf)) {
                    array_push($this->_bootstrap_templates, $ar_buf[1]);
                } else {
                    array_push($this->_templates, $tpl_name);
                }
            }
        }
    }
73024
public function get($key)
    {
        if ($this->has($key)) {
            return $this->templates[(string) $key];
        }

        return null;
    }
10077
public function getTemplates()
    {
        $templates = array();

        if ($handle = opendir(Primer::$PATTERN_PATH . '/templates')) {
            while (false !== ($entry = readdir($handle))) {
                if (substr($entry, 0, 1) !== '.') {
                    $templates[] = array(
                        'id' => $entry,
                        'title' => preg_replace('/[^A-Za-z0-9]/', ' ', $entry),
                    );
                }
            }

            closedir($handle);
        }

        return $templates;
    }
800970
public function getInitApps($app)
    {
        if ($app) {
            return isset($this->initApps[$app]) ? $this->initApps[$app] : null;
        }
        return $this->initApps;
    }
632233
public function getTemplates()
	{
		$templates = [
			'br' => '<br/>',
			'e'  => '',
			'i'  => '',
			'p'  => '<p><xsl:apply-templates/></p>',
			's'  => ''
		];

		foreach ($this->configurator->tags as $tagName => $tag)
		{
			if (isset($tag->template))
			{
				$templates[$tagName] = (string) $tag->template;
			}
		}

		ksort($templates);

		return $templates;
	}
297350
private function _get_template( $fallback = '' ) {
		$templates = $this->_templates();

		foreach ( $templates as $template ) {
			if ( file_exists( $template ) ) {
				return $template;
			}
		}

		return $fallback;
	}
517038
protected function _templates($customTemplate = null, $customTemplateSuffix = null)
    {
        $templates = SSViewer::get_templates_by_class(static::class, $customTemplateSuffix, __CLASS__);
        // Prefer any custom template
        if ($customTemplate) {
            // Prioritise direct template
            array_unshift($templates, $customTemplate);
        }
        return $templates;
    }
767170
protected function getPageTemplates()
    {
        $choices = [];

        $templates = $this->getContainer()->getParameter('networking_init_cms.page.templates');
        foreach ($templates as $key => $template) {
            $choices[$template['name']] = $key;
        }

        return $choices;
    }
254132
protected function provideTemplatingSystem(Application $app)
    {
        $templateDir = __DIR__ . '/../../../data/templates';

        // when installed using composer the templates are in a different folder
        $composerTemplatePath = __DIR__ . '/../../../../templates';
        if (file_exists($composerTemplatePath)) {
            $templateDir = $composerTemplatePath;
        }

        // parameters
        $app['transformer.template.location'] = $templateDir;

        // services
        $app['transformer.template.path_resolver'] = $app->share(
            function ($container) {
                return new PathResolver($container['transformer.template.location']);
            }
        );

        $app['transformer.template.factory'] = $app->share(
            function ($container) {
                return new Factory(
                    $container['transformer.template.path_resolver'],
                    $container['serializer']
                );
            }
        );

        $app['transformer.template.collection'] = $app->share(
            function ($container) {
                return new Template\Collection(
                    $container['transformer.template.factory'],
                    $container['transformer.writer.collection']
                );
            }
        );
    }