Example #1
0
 /**
  * @param File              $file
  * @param \Twig_Environment $twig
  * @param string            $target
  * @param string            $basePath
  */
 private function renderFile(File $file, \Twig_Environment $twig, $target, $basePath)
 {
     $path = $target . '/' . $file->getDestination($basePath);
     $this->createDirIfNotExist($path);
     file_put_contents($path, $twig->render('file.twig', array('file' => $file, 'assets' => $this->assetsPath($target, $path))));
 }