Returns a list of all template names.

@return string[]
168724
public function getAllNames()
    {
        /** @var \RecursiveDirectoryIterator $files */
        $files = new \DirectoryIterator($this->getTemplatePath());

        $template_names = [];
        while ($files->valid()) {
            $name = $files->getBasename();

            // skip abstract files
            if (!$files->isDir() || in_array($name, ['.', '..'], true)) {
                $files->next();
                continue;
            }

            $template_names[] = $name;
            $files->next();
        }

        return $template_names;
    }
1281902
public function templates()
    {
        try {
            $directory = $this->getTemplateDir();
            $files = File::files($directory);
        } catch (Exception $e) {
            $files = File::files(base_path('vendor/typicms/pages/src/resources/views/public'));
        }
        $templates = [];
        foreach ($files as $file) {
            $filename = File::name($file);
            if ($filename === 'default.blade') {
                continue;
            }
            $name = str_replace('.blade', '', $filename);
            if ($name[0] != '_' && $name != 'master') {
                $templates[$name] = ucfirst($name);
            }
        }

        return ['' => 'Default'] + $templates;
    }
1366228
private function getTemplateList()
    {
        $templates = $this->getAvailableTemplates($this->bundle);

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

        return $types;
    }
230420
protected function getTemplateArguments()
    {
        $templateArguments = $this->arguments['arguments'] ?: [];
        ArrayUtility::mergeRecursiveWithOverrule($templateArguments, $this->fieldService->getFieldOptions());

        return $templateArguments;
    }
22431
public function getTemplateAccessors() {
		if($this->templateAccessors) return $this->templateAccessors;

		$list = array ('Up', 'Top');
		foreach(ClassInfo::implementorsOf('TemplateGlobalProvider') as $class) {
			$vars = $class::get_template_global_variables();
			if($vars) {
				foreach($vars as $varName => $func) {
					$list[] = is_numeric($varName) ? strtolower($func) : strtolower($varName);
				}
			}
		}

		return $this->templateAccessors = $list;		
	}
1004458
def get_template_names(self):
        """"""
        if self.request.is_ajax():
            template = self.ajax_template_name
        else:
            template = self.template_name
        return template
805858
protected function getTemplateName() {
				$templateName = $this->templateName;
				
				if($templatePrefix = $this->templatePrefix())
						$templateName = $this->joinPrefix($templateName, $templatePrefix);
				
				if($templateSuffix = $this->templateSuffix())
						$templateName = $this->joinSuffix($templateName, $templateSuffix);
				
				return $templateName;
		}
1300579
protected static function pluginsWithTemplates(): array
    {
        $plugins = Plugin::loaded();

        array_walk($plugins, function ($plugin, $index) use (&$plugins) {
            $paths = App::path('Template', $plugin);

            array_walk($paths, function ($path, $index) use (&$paths) {
                if (!is_dir($path)) {
                    unset($paths[$index]);
                }
            });
        });

        return $plugins;
    }
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;
	}
623170
public function listAll()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->ListTemplates();
            if ( isset($result->ListTemplatesResult) ) {
                $ret = $this->getSoapClient()->backendListArrayToMultiAssocArray($result->ListTemplatesResult);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while getting the list of all uploaded templates' , $ex);
        }
    }
1205242
public function getChildTemplates(string $context): array
    {
        Splash::log()->Deb('Loading Standalone Connector Templates for '.$context);
        $result = array();
        //====================================================================//
        // Safety Check
        if (!in_array($context, array('New', 'Offline', 'Connected'), true)) {
            return $result;
        }
        //====================================================================//
        // Load templates for All Objects
        foreach ($this->getAvailableObjects() as $objectType) {
            $objectService = $this->getObjectService($objectType);
            if (method_exists($objectService, 'get'.$context.'Template')) {
                $result[] = $objectService->{'get'.$context.'Template'}();
            }
        }
        //====================================================================//
        // Return Results
        return $result;
    }
684778
public function findAllTemplates()
    {
        if (null !== $this->templates) {
            return $this->templates;
        }

        $templates = array();

        foreach ($this->paths as $dir) {
            $templates = array_merge($templates, $this->findTemplatesInFolder($dir));
        }

        return $this->templates = $templates;
    }
571570
public function onGetTemplateList()
    {
        $this->validateRequestTheme();

        $page = Page::inTheme($this->theme);
        return [
            'layouts' => $page->getLayoutOptions()
        ];
    }
1003473
public function getAllTemplates()
    {
        $strCacheDir = $this->container->getParameter('kernel.cache_dir');

        // Try to load from cache
        if (file_exists($strCacheDir.'/contao/config/twig-templates.php')) {
            self::$twigFiles = include $strCacheDir.'/contao/config/twig-templates.php';

            return self::$twigFiles;
        }

        $bundles = $this->kernel->getBundles();

        if (\is_array($bundles)) {
            foreach (array_reverse($bundles) as $key => $value) {
                $path = $this->kernel->locateResource("@$key");

                $dir = rtrim($path, '/').'/Resources/views';

                if (!is_dir($dir)) {
                    continue;
                }
                $finder = new Finder();
                $twigKey = preg_replace('/Bundle$/', '', $key);

                foreach ($finder->in($dir)->files()->name('*.twig') as $file) {
                    /** @var SplFileInfo $file */
                    $name = $file->getBasename();
                    $legacyName = false !== strpos($name, 'html.twig') ? $file->getBasename('.html.twig') : $name;

                    if (isset(self::$twigFiles[$name])) {
                        continue;
                    }

                    self::$twigFiles[$name] = "@$twigKey/".$file->getRelativePathname();

                    if ($legacyName !== $name) {
                        self::$twigFiles[$legacyName] = self::$twigFiles[$name];
                    }
                }
            }
        }

        foreach ($this->container->get('contao.resource_finder')->findIn('templates')->name('*.twig') as $file) {
            $name = $file->getBasename();
            $legacyName = false !== strpos($name, 'html.twig') ? $file->getBasename('.html.twig') : $name;

            /* @var SplFileInfo $file */
            self::$twigFiles[$name] = $file->getRealPath();

            if ($legacyName !== $name) {
                self::$twigFiles[$legacyName] = self::$twigFiles[$name];
            }
        }

        // add root templates
        $rootTemplates = $this->findTemplates($this->containerUtil->getProjectDir().'/templates/');

        if (\is_array($rootTemplates)) {
            foreach ($rootTemplates as $file) {
                $name = basename($file);
                $legacyName = false !== strpos($name, 'html.twig') ? basename($file, '.html.twig') : $name;

                self::$twigFiles[$name] = $file;

                if ($legacyName !== $name) {
                    self::$twigFiles[$legacyName] = self::$twigFiles[$name];
                }
            }
        }

        return self::$twigFiles;
    }
1308142
public function getTemplate(string $templateName): array
    {
        if (is_array($this->template))
            return $this->template;

        if (property_exists($this->getTemplateManager(), $templateName))
            return $this->getTemplateManager()->$templateName;

        $templateName = 'get' . ucfirst($templateName);
        if (! method_exists($this->getTemplateManager(), $templateName))
            trigger_error(sprintf('No template "%s" was found in %s Manager.', $templateName, get_class($this->getTemplateManager())), E_USER_ERROR);

        return $this->getTemplateManager()->$templateName();
    }
223200
def get_template_names(self):
        """"""
        request = self.request
        querystring_key = request.REQUEST.get('querystring_key', PAGE_LABEL)
        if request.is_ajax() and querystring_key == self.key:
            return [self.page_template]
        return super(
            AjaxMultipleObjectTemplateResponseMixin, self).get_template_names()
1229741
protected function getPlainLabels()
    {
        $labels = [];

        foreach (Config::getCustomModelTemplates() as $key => $properties) {
            $label = $this->makeModelLabel($key, $properties, true, $this->defaultLang);
            $labels[$this->defaultLang][] = $label;
        }

        return $labels;
    }