FusionService
class FusionService (View source)
The Fusion Service
Properties
protected Parser | $fusionParser | ||
protected SiteRepository | $siteRepository | ||
protected ObjectManagerInterface | $objectManager | ||
protected string | $siteRootFusionPattern | Pattern used for determining the Fusion root file for a site |
|
protected string | $autoIncludeFusionPattern | Pattern used for determining the Fusion root file for autoIncludes |
|
protected array | $prependFusionIncludes | Array of Fusion files to include before the site Fusion |
|
protected array | $appendFusionIncludes | Array of Fusion files to include after the site Fusion |
|
protected array | $autoIncludeConfiguration | ||
protected NodeTypeManager | $nodeTypeManager | ||
protected PackageManager | $packageManager |
Methods
Create a runtime for the given site node
Returns a merged Fusion object tree in the context of the given nodes
Reads the Fusion file from the given path and filename.
Generate Fusion prototype definitions for all node types
Generate a Fusion prototype definition for a given node type
Concatenate the given Fusion resources with include statements
Prepares an array with Fusion paths to auto include before the Site Fusion.
Set the pattern for including the site root Fusion
Get the Fusion resources that are included before the site Fusion.
Set Fusion resources that should be prepended before the site Fusion, it defaults to the Neos Root.fusion Fusion.
Get Fusion resources that will be appended after the site Fusion.
Set Fusion resources that should be appended after the site Fusion, this defaults to an empty array.
Details
Runtime
createRuntime(TraversableNodeInterface $currentSiteNode, ControllerContext $controllerContext)
Create a runtime for the given site node
array
getMergedFusionObjectTree(TraversableNodeInterface $startNode)
Returns a merged Fusion object tree in the context of the given nodes
protected Site
getSiteForSiteNode(TraversableNodeInterface $siteNode)
No description
protected string
readExternalFusionFile(string $pathAndFilename)
Reads the Fusion file from the given path and filename.
If it doesn't exist, this function will just return an empty string.
protected string
generateNodeTypeDefinitions()
Generate Fusion prototype definitions for all node types
Only fully qualified node types (e.g. MyVendor.MyPackage:NodeType) will be considered.
protected string
generateFusionForNodeType(NodeType $nodeType)
Generate a Fusion prototype definition for a given node type
A prototype will be rendererd with the generator-class defined in the nodeType-configuration 'fusion.prototypeGenerator'
protected string
getFusionIncludes(array $fusionResources)
Concatenate the given Fusion resources with include statements
protected array
prepareAutoIncludeFusion()
Prepares an array with Fusion paths to auto include before the Site Fusion.
void
setSiteRootFusionPattern(string $siteRootFusionPattern)
Set the pattern for including the site root Fusion
array
getPrependFusionIncludes()
Get the Fusion resources that are included before the site Fusion.
void
setPrependFusionIncludes(array $prependFusionIncludes)
Set Fusion resources that should be prepended before the site Fusion, it defaults to the Neos Root.fusion Fusion.
array
getAppendFusionIncludes()
Get Fusion resources that will be appended after the site Fusion.
void
setAppendFusionIncludes(array $appendFusionIncludes)
Set Fusion resources that should be appended after the site Fusion, this defaults to an empty array.