setLayoutRootPath() public method

Sets the absolute path to the folder that contains Fluid layout files
public setLayoutRootPath ( string $layoutRootPath ) : void
$layoutRootPath string Fluid layout root path
return void
 /**
  * @test
  * @expectedException \Neos\FluidAdaptor\View\Exception\InvalidTemplateResourceException
  */
 public function getLayoutPathAndFilenameThrowsExceptionIfLayoutFileIsADirectory()
 {
     vfsStreamWrapper::register();
     mkdir('vfs://MyLayouts/NotAFile');
     $this->standaloneView->setLayoutRootPath('vfs://MyLayouts');
     $this->standaloneView->getTemplatePaths()->getLayoutSource('NotAFile');
 }
 /**
  * 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;
 }
Exemplo n.º 3
0
 /**
  * @return StandaloneView
  * @throws FinisherException
  */
 protected function initializeStandaloneView()
 {
     $standaloneView = new StandaloneView();
     if (!isset($this->options['templatePathAndFilename'])) {
         throw new FinisherException('The option "templatePathAndFilename" must be set for the EmailFinisher.', 1327058829);
     }
     $standaloneView->setTemplatePathAndFilename($this->options['templatePathAndFilename']);
     if (isset($this->options['partialRootPath'])) {
         $standaloneView->setPartialRootPath($this->options['partialRootPath']);
     }
     if (isset($this->options['layoutRootPath'])) {
         $standaloneView->setLayoutRootPath($this->options['layoutRootPath']);
     }
     if (isset($this->options['variables'])) {
         $standaloneView->assignMultiple($this->options['variables']);
     }
     return $standaloneView;
 }