src/Trident/Module/FrameworkModule/Console/Command/AssetsCompileCommand.php
protected function findTemplates(array $dirs, OutputInterface $output)
    {
        $filesystem = new FileSystem();

        $templates = [];

        foreach ($dirs as $name => $dir) {
            $output->write(sprintf('Finding templates in "%s"', $name));

            try {
                if ($filesystem->exists($dir)) {
                    $finder = new Finder();
                    $finder->files()->in($dir)->name('*.html.twig');

                    foreach ($finder as $file) {
                        $templates[] = $file->getPathName();
                    }

                    $output->writeln(sprintf('... <info>%s Found</info>', count($finder)));
                } else {
                    $output->writeln('... <comment>N/A</comment>');
                }
            } catch (\Exception $e) {
                $output->writeln('... <error>Error</error>');
            }
        }

        $output->writeln('');

        return $templates;
    }
protected function findTemplates(array $dirs, OutputInterface $output)
    {
        $filesystem = new FileSystem();

        $templates = [];

        foreach ($dirs as $name => $dir) {
            $output->write(sprintf('Finding templates in "%s"', $name));

            try {
                if ($filesystem->exists($dir)) {
                    $finder = new Finder();
                    $finder->files()->in($dir)->name('*.html.twig');

                    foreach ($finder as $file) {
                        $templates[] = $file->getPathName();
                    }

                    $output->writeln(sprintf('... <info>%s Found</info>', count($finder)));
                } else {
                    $output->writeln('... <comment>N/A</comment>');
                }
            } catch (\Exception $e) {
                $output->writeln('... <error>Error</error>');
            }
        }

        $output->writeln('');

        return $templates;
    }
protected function findTemplates ( array $ dirs , OutputInterface $ output ) { $ filesystem = new FileSystem ( ) ; $ templates = [ ] ; foreach ( $ dirs as $ name => $ dir ) { $ output -> write ( sprintf ( 'Finding templates in "%s"' , $ name ) ) ; try { if ( $ filesystem -> exists ( $ dir ) ) { $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ dir ) -> name ( '*.html.twig' ) ; foreach ( $ finder as $ file ) { $ templates [ ] = $ file -> getPathName ( ) ; } $ output -> writeln ( sprintf ( '... <info>%s Found</info>' , count ( $ finder ) ) ) ; } else { $ output -> writeln ( '... <comment>N/A</comment>' ) ; } } catch ( \ Exception $ e ) { $ output -> writeln ( '... <error>Error</error>' ) ; } } $ output -> writeln ( '' ) ; return $ templates ; }
Find templates. Outputs status.

@param array           $dirs
@param OutputInterface $output

@return array
Find templates . Outputs status .