createRuntime() public méthode

Create a runtime for the given site node
public createRuntime ( Neos\ContentRepository\Domain\Model\NodeInterface $currentSiteNode, ControllerContext $controllerContext ) : Runtime
$currentSiteNode Neos\ContentRepository\Domain\Model\NodeInterface
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext
Résultat Neos\Fusion\Core\Runtime
 /**
  * @param NodeInterface $currentSiteNode
  * @return \Neos\Fusion\Core\Runtime
  */
 protected function getTypoScriptRuntime(NodeInterface $currentSiteNode)
 {
     if ($this->typoScriptRuntime === null) {
         $this->typoScriptRuntime = $this->typoScriptService->createRuntime($currentSiteNode, $this->controllerContext);
         if (isset($this->options['enableContentCache']) && $this->options['enableContentCache'] !== null) {
             $this->typoScriptRuntime->setEnableContentCache($this->options['enableContentCache']);
         }
     }
     return $this->typoScriptRuntime;
 }
Exemple #2
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;
 }