src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php
public function renderTwigFile($template, $target, array $parameters, $sourceDir)
    {
        if (!is_dir(dirname($target))) {
            mkdir(dirname($target), 0777, true);
        }

        return file_put_contents($target, $this->renderTwig($template, $parameters, $sourceDir));
    }
public function renderTwigFile($template, $target, array $parameters, $sourceDir)
    {
        if (!is_dir(dirname($target))) {
            mkdir(dirname($target), 0777, true);
        }

        return file_put_contents($target, $this->renderTwig($template, $parameters, $sourceDir));
    }
public function renderTwigFile ( $ template , $ target , array $ parameters , $ sourceDir ) { if ( ! is_dir ( dirname ( $ target ) ) ) { mkdir ( dirname ( $ target ) , 0777 , true ) ; } return file_put_contents ( $ target , $ this -> renderTwig ( $ template , $ parameters , $ sourceDir ) ) ; }
Render a twig file, and save it to disk.

@param string $template
@param string $target
@param array  $parameters
@param string $sourceDir

@return int
Render a twig file and save it to disk .