Neos\FluidAdaptor\View\StandaloneView::setLayoutRootPath PHP Метод

setLayoutRootPath() публичный Метод

Sets the absolute path to the folder that contains Fluid layout files
public setLayoutRootPath ( string $layoutRootPath ) : void
$layoutRootPath string Fluid layout root path
Результат void
    public function setLayoutRootPath($layoutRootPath)
    {
        $this->baseRenderingContext->getTemplatePaths()->setLayoutRootPaths([$layoutRootPath]);
    }

Usage Example

 /**
  * @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');
 }
All Usage Examples Of Neos\FluidAdaptor\View\StandaloneView::setLayoutRootPath