Exemplo n.º 1
0
 /**
  * @param AbstractViewComponent $component
  * @param string $templatePath
  * @param null $templateString
  * @param ResourceRepository $repo
  */
 public function __construct(AbstractViewComponent $component, $templatePath = null, $templateString = null, ResourceRepository $repo = null)
 {
     parent::__construct($component);
     $this->templatePath = $templatePath;
     $this->templateString = $templateString;
     // Optional Puli repo
     $this->repo = $repo;
 }
Exemplo n.º 2
0
 /**
  * @param AbstractViewComponent $component
  * @param string $templatePath
  * @param null $templateString
  * @param ResourceRepository $repo
  */
 public function __construct(AbstractViewComponent $component, $templatePath = null, $templateString = null, ResourceRepository $repo = null)
 {
     parent::__construct($component);
     $this->templatePath = $templatePath;
     $this->templateString = $templateString;
     // Optional Puli repo
     $this->repo = $repo;
     Twig_Autoloader::register();
     $this->initTwig($this->getLoader());
 }