framework/RedKiteCms/Content/Theme/ThemeBase.php
private function findTemplates()
    {
        $templates = array(
            "base" => array(),
            "template" => array(),
        );
        $finder = new Finder();
        $files = $finder->files()->in($this->templatesDir);
        foreach ($files as $file) {
            $file = (string)$file;
            $templateName = basename($file, '.html.twig');

            $key = 'template';
            if (str_replace($this->templatesDir . '/', '', $file) != $templateName . '.html.twig') {
                $key = 'base';
            }
            $templates[$key][$templateName] = $file;
        }

        return $templates;
    }
private function findTemplates()
    {
        $templates = array(
            "base" => array(),
            "template" => array(),
        );
        $finder = new Finder();
        $files = $finder->files()->in($this->templatesDir);
        foreach ($files as $file) {
            $file = (string)$file;
            $templateName = basename($file, '.html.twig');

            $key = 'template';
            if (str_replace($this->templatesDir . '/', '', $file) != $templateName . '.html.twig') {
                $key = 'base';
            }
            $templates[$key][$templateName] = $file;
        }

        return $templates;
    }
private function findTemplates ( ) { $ templates = array ( "base" => array ( ) , "template" => array ( ) , ) ; $ finder = new Finder ( ) ; $ files = $ finder -> files ( ) -> in ( $ this -> templatesDir ) ; foreach ( $ files as $ file ) { $ file = ( string ) $ file ; $ templateName = basename ( $ file , '.html.twig' ) ; $ key = 'template' ; if ( str_replace ( $ this -> templatesDir . '/' , '' , $ file ) != $ templateName . '.html.twig' ) { $ key = 'base' ; } $ templates [ $ key ] [ $ templateName ] = $ file ; } return $ templates ; }
Finds the theme's templates
@param null|int $depth When null parses all subfolders

@return array
Finds the theme s templates @param null|int $depth When null parses all subfolders