/** * Prepare a Fluid view for rendering an error page with the Neos backend * * @return StandaloneView */ protected function prepareFluidView() { $fluidView = new StandaloneView(); $fluidView->setControllerContext($this->runtime->getControllerContext()); $fluidView->setFormat('html'); $fluidView->setTemplatePathAndFilename('resource://Neos.Neos/Private/Templates/Error/NeosBackendMessage.html'); $fluidView->setLayoutRootPath('resource://Neos.Neos/Private/Layouts/'); // FIXME find a better way than using templates as partials $fluidView->setPartialRootPath('resource://Neos.Neos/Private/Templates/TypoScriptObjects/'); return $fluidView; }
/** * @param NodeInterface $node * @return string * @throws NeosException */ public function render(NodeInterface $node) { if ($this->privilegeManager->isPrivilegeTargetGranted('Neos.Neos:Backend.GeneralAccess') === false) { return ''; } /** @var $actionRequest ActionRequest */ $actionRequest = $this->controllerContext->getRequest(); $innerView = new StandaloneView($actionRequest); $innerView->setTemplatePathAndFilename('resource://Neos.Neos/Private/Templates/Backend/Content/Container.html'); $innerView->setFormat('html'); $innerView->setPartialRootPath('resource://Neos.Neos/Private/Partials'); $user = $this->partyService->getAssignedPartyOfAccount($this->securityContext->getAccount()); $innerView->assignMultiple(array('node' => $node, 'modules' => $this->menuHelper->buildModuleList($this->controllerContext), 'sites' => $this->menuHelper->buildSiteList($this->controllerContext), 'user' => $user)); return $innerView->render(); }