Neos\FluidAdaptor\View\StandaloneView::setPartialRootPath PHP Method

setPartialRootPath() public method

Sets the absolute path to the folder that contains Fluid partial files.
public setPartialRootPath ( string $partialRootPath ) : void
$partialRootPath string Fluid partial root path
return void
    public function setPartialRootPath($partialRootPath)
    {
        $this->baseRenderingContext->getTemplatePaths()->setPartialRootPaths([$partialRootPath]);
    }

Usage Example

 /**
  * @test
  * @expectedException \Neos\FluidAdaptor\View\Exception\InvalidTemplateResourceException
  */
 public function getPartialPathAndFilenameThrowsExceptionIfPartialFileIsADirectory()
 {
     vfsStreamWrapper::register();
     mkdir('vfs://MyPartials/NotAFile');
     $this->standaloneView->setPartialRootPath('vfs://MyPartials');
     $this->standaloneView->getTemplatePaths()->getPartialSource('NotAFile');
 }
All Usage Examples Of Neos\FluidAdaptor\View\StandaloneView::setPartialRootPath