Exemple #1
0
 /**
  * Sets up the view
  */
 public function __construct()
 {
     $this->view = GeneralUtility::makeInstance(TemplateView::class);
     $context = new RenderingContext($this->view);
     $context->setControllerName('ErrorPage');
     $context->setTemplatePaths(new TemplatePaths(['templateRootPaths' => [ExtensionManagementUtility::extPath('core', 'Resources/Private/Templates/ErrorPage/')]]));
     $this->view->setRenderingContext($context);
 }
 /**
  * Constructor
  *
  * @param null|RenderingContextInterface $context
  */
 public function __construct(RenderingContextInterface $context = NULL)
 {
     if (!$context) {
         $context = new RenderingContext($this);
         $context->setControllerName('Default');
         $context->setControllerAction('Default');
     }
     $this->setRenderingContext($context);
 }
 /**
  * Constructor
  *
  * @param TemplatePaths $paths
  * @param RenderingContext $context
  * @param FluidCacheInterface $cache
  */
 public function __construct(TemplatePaths $paths, RenderingContext $context = NULL, FluidCacheInterface $cache = NULL)
 {
     if (!$context) {
         $context = new RenderingContext();
         $context->setControllerName('Default');
         $context->setControllerAction('Default');
         $context->setVariableProvider(new StandardVariableProvider($this->variables));
         $context->injectViewHelperVariableContainer(new ViewHelperVariableContainer());
     }
     $this->templatePaths = $paths;
     $this->viewHelperResolver = new ViewHelperResolver();
     $this->setRenderingContext($context);
     $this->setTemplateCompiler(new TemplateCompiler($this->viewHelperResolver));
     $this->setTemplateParser(new TemplateParser($this->viewHelperResolver));
     $this->templateCompiler->setTemplateCache($cache);
 }
 /**
  * @param string $controllerName
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerNameException
  */
 public function setControllerName($controllerName)
 {
     parent::setControllerName($controllerName);
     $this->controllerContext->getRequest()->setControllerName($controllerName);
 }