FluidTYPO3\Flux\View\TemplatePaths::setTemplateRootPaths PHP Method

setTemplateRootPaths() public method

public setTemplateRootPaths ( array $templateRootPaths ) : void
$templateRootPaths array
return void
    public function setTemplateRootPaths(array $templateRootPaths)
    {
        $this->templateRootPaths = $templateRootPaths;
    }

Usage Example

 /**
  * @dataProvider getInitializeVariantsTestValues
  * @param array $variants
  * @param array $expectedVariants
  * @param array $expectedVersions
  */
 public function testInitializeVariants(array $variants, array $expectedVariants, array $expectedVersions)
 {
     $templatePaths = new TemplatePaths('fluidcontent_core');
     $templatePaths->setTemplateRootPaths(array(ExtensionManagementUtility::extPath('fluidcontent_core', 'Tests/Fixtures/Templates/')));
     $paths = $templatePaths->toArray();
     $instance = new AccessibleConfigurationService();
     $instance->setRegisteredVariants($variants);
     $instance->setViewConfiguration($paths);
     $instance->initializeVariants();
     $this->assertEquals($expectedVariants, $instance->getVariants());
     $this->assertEquals($expectedVersions, $instance->getVersions());
 }
All Usage Examples Of FluidTYPO3\Flux\View\TemplatePaths::setTemplateRootPaths