Neos\Neos\Domain\Service\TypoScriptService::setSiteRootTypoScriptPattern PHP Method

setSiteRootTypoScriptPattern() public method

Set the pattern for including the site root TypoScript
public setSiteRootTypoScriptPattern ( string $siteRootTypoScriptPattern ) : void
$siteRootTypoScriptPattern string A string for the sprintf format that takes the site package key as a single placeholder
return void
    public function setSiteRootTypoScriptPattern($siteRootTypoScriptPattern)
    {
        $this->siteRootTypoScriptPattern = $siteRootTypoScriptPattern;
    }

Usage Example

Example #1
0
 /**
  * Create a TypoScript runtime with the test base TypoScript and an optional additional fixture
  *
  * @param string $additionalTypoScriptFile
  * @return \Neos\Fusion\Core\Runtime
  */
 protected function createRuntimeWithFixtures($additionalTypoScriptFile = null)
 {
     $typoScriptService = new TypoScriptService();
     $typoScriptService->setSiteRootTypoScriptPattern(__DIR__ . '/Fixtures/BaseTypoScript.fusion');
     if ($additionalTypoScriptFile !== null) {
         $typoScriptService->setAppendTypoScriptIncludes(array($additionalTypoScriptFile));
     }
     $controllerContext = $this->buildMockControllerContext();
     $runtime = $typoScriptService->createRuntime($this->node->getParent(), $controllerContext);
     return $runtime;
 }