Author: Alexander (iam.asm89@gmail.com)
Beispiel #1
0
 protected function validateTemplate(\Twig_Environment $twig, OutputInterface $output, $template, $file = null)
 {
     try {
         $twig->parse($twig->tokenize($template, $file ? (string) $file : null));
         $output->ok($template, $file);
     } catch (\Twig_Error $e) {
         $output->error($template, $e, $file);
         return 1;
     }
     return 0;
 }