src/TweedeGolf/Generator/Action/TemplateAction.php
public function getTemplateContent($template, array $variables)
    {
        $dir = dirname($template);
        $file = basename($template);

        $twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array($dir)), array(
            'debug'            => true,
            'cache'            => false,
            'strict_variables' => true,
            'autoescape'       => false,
        ));
        return $twig->render($file, $variables);
    }
public function getTemplateContent($template, array $variables)
    {
        $dir = dirname($template);
        $file = basename($template);

        $twig = new \Twig_Environment(new \Twig_Loader_Filesystem(array($dir)), array(
            'debug'            => true,
            'cache'            => false,
            'strict_variables' => true,
            'autoescape'       => false,
        ));
        return $twig->render($file, $variables);
    }
public function getTemplateContent ( $ template , array $ variables ) { $ dir = dirname ( $ template ) ; $ file = basename ( $ template ) ; $ twig = new \ Twig_Environment ( new \ Twig_Loader_Filesystem ( array ( $ dir ) ) , array ( 'debug' => true , 'cache' => false , 'strict_variables' => true , 'autoescape' => false , ) ) ; return $ twig -> render ( $ file , $ variables ) ; }
Return the rendered content of a template.
@param string $template
@param array $variables
@return string
Return the rendered content of a template .