src/BackendIntegration/TemplateList.php
private function getTemplatesForBaseFrom($base, $folder, $themeName)
    {
        if (!is_dir($folder)) {
            return [];
        }

        $themeName      = trim($themeName);
        $foundTemplates = Finder::create()->in($folder)->name($base . '*');

        $templates = [];
        foreach ($foundTemplates as $template) {
            /** @var \Symfony\Component\Finder\SplFileInfo $template */
            $templates[$template->getBasename('.' . $template->getExtension())] = [$themeName => $themeName];
        }

        return $templates;
    }
private function getTemplatesForBaseFrom($base, $folder, $themeName)
    {
        if (!is_dir($folder)) {
            return [];
        }

        $themeName      = trim($themeName);
        $foundTemplates = Finder::create()->in($folder)->name($base . '*');

        $templates = [];
        foreach ($foundTemplates as $template) {
            /** @var \Symfony\Component\Finder\SplFileInfo $template */
            $templates[$template->getBasename('.' . $template->getExtension())] = [$themeName => $themeName];
        }

        return $templates;
    }
Fetch a list of matching templates of the current base within the given folder and the passed theme name.

@param string $base      The base for the templates to be retrieved.

@param string $folder    The folder to search in.

@param string $themeName The name of the theme for the given folder (will get used in the returned description
text).

@return array