src/PHPDish/Bundle/ThemeBundle/CacheWarmer/TemplateFinder.php
public function findAllTemplates()
    {
        if (null !== $this->templates) {
            return $this->templates;
        }
        //All themes
        $this->themes = $this->themeManager->getThemes();

        $templates = array();

        foreach ($this->kernel->getBundles() as $bundle) {
            $templates = array_merge($templates, $this->findTemplatesInBundle($bundle));
        }

        $templates = array_merge($templates, $this->findTemplatesInFolder($this->rootDir.'/views'));

        return $this->templates = $templates;
    }
public function findAllTemplates()
    {
        if (null !== $this->templates) {
            return $this->templates;
        }
        //All themes
        $this->themes = $this->themeManager->getThemes();

        $templates = array();

        foreach ($this->kernel->getBundles() as $bundle) {
            $templates = array_merge($templates, $this->findTemplatesInBundle($bundle));
        }

        $templates = array_merge($templates, $this->findTemplatesInFolder($this->rootDir.'/views'));

        return $this->templates = $templates;
    }
Find all the templates in the bundle and in the kernel Resources folder.

@return TemplateReferenceInterface[]