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

createRuntime() public method

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
return Neos\Fusion\Core\Runtime
    public function createRuntime(NodeInterface $currentSiteNode, ControllerContext $controllerContext)
    {
        $typoScriptObjectTree = $this->getMergedTypoScriptObjectTree($currentSiteNode);
        $typoScriptRuntime = new Runtime($typoScriptObjectTree, $controllerContext);
        return $typoScriptRuntime;
    }

Usage Example

 /**
  * @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;
 }
All Usage Examples Of Neos\Neos\Domain\Service\TypoScriptService::createRuntime