protected function findFilesInFolder($dir, $extension)
    {
        $templates = array();
        if (is_dir($dir)) {
            $finder = new Finder();
            foreach ($finder->files()->followLinks()->in($dir)->exclude('cache')->name('*.' . $extension) as $file) {
                $templates[] = $this->relative($file->getPathname());
            }
        }

        return $templates;
    }