PHP Class Neos\Neos\Domain\Service\TypoScriptService

Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$appendTypoScriptIncludes array Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
$autoIncludeConfiguration array
$autoIncludeTypoScriptPattern string Pattern used for determining the TypoScript root file for autoIncludes
$legacyAutoIncludeTypoScriptPattern string Legacy pattern used for determining the TypoScript root file for autoIncludes
$legacySiteRootTypoScriptPattern string Legacy pattern used for determining the TypoScript root file for a site
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$packageManager Neos\Flow\Package\PackageManagerInterface
$prependTypoScriptIncludes array Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
$siteRootTypoScriptPattern string Pattern used for determining the TypoScript root file for a site
$typoScriptParser Neos\Fusion\Core\Parser

Méthodes publiques

Méthode Description
createRuntime ( Neos\ContentRepository\Domain\Model\NodeInterface $currentSiteNode, ControllerContext $controllerContext ) : Runtime Create a runtime for the given site node
getAppendTypoScriptIncludes ( ) : array Get TypoScript resources that will be appended after the site TypoScript.
getMergedTypoScriptObjectTree ( Neos\ContentRepository\Domain\Model\NodeInterface $startNode ) : array Returns a merged TypoScript object tree in the context of the given nodes
getPrependTypoScriptIncludes ( ) : array Get the TypoScript resources that are included before the site TypoScript.
initializeObject ( ) : void Initializes the parser
setAppendTypoScriptIncludes ( array $appendTypoScriptIncludes ) : void Set TypoScript resources that should be appended after the site TypoScript, this defaults to an empty array.
setPrependTypoScriptIncludes ( array $prependTypoScriptIncludes ) : void Set TypoScript resources that should be prepended before the site TypoScript, it defaults to the Neos Root.fusion TypoScript.
setSiteRootTypoScriptPattern ( string $siteRootTypoScriptPattern ) : void Set the pattern for including the site root TypoScript

Méthodes protégées

Méthode Description
generateNodeTypeDefinitions ( ) : string Generate TypoScript prototype definitions for all node types
generateTypoScriptForNodeType ( NodeType $nodeType ) : string Generate a TypoScript prototype definition for a given node type
getTypoScriptIncludes ( array $typoScriptResources ) : string Concatenate the given TypoScript resources with include statements
prepareAutoIncludeTypoScript ( ) : array Prepares an array with TypoScript paths to auto include before the Site TypoScript.
readExternalTypoScriptFile ( string $pathAndFilename ) : string Reads the TypoScript file from the given path and filename.

Method Details

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

generateNodeTypeDefinitions() protected méthode

Only fully qualified node types (e.g. MyVendor.MyPackage:NodeType) will be considered.
protected generateNodeTypeDefinitions ( ) : string
Résultat string

generateTypoScriptForNodeType() protected méthode

A prototype will be rendererd with the generator-class defined in the nodeType-configuration 'fusion.prototypeGenerator'
protected generateTypoScriptForNodeType ( NodeType $nodeType ) : string
$nodeType Neos\ContentRepository\Domain\Model\NodeType
Résultat string

getAppendTypoScriptIncludes() public méthode

Get TypoScript resources that will be appended after the site TypoScript.
public getAppendTypoScriptIncludes ( ) : array
Résultat array

getMergedTypoScriptObjectTree() public méthode

Returns a merged TypoScript object tree in the context of the given nodes
public getMergedTypoScriptObjectTree ( Neos\ContentRepository\Domain\Model\NodeInterface $startNode ) : array
$startNode Neos\ContentRepository\Domain\Model\NodeInterface Node marking the starting point
Résultat array The merged object tree as of the given node

getPrependTypoScriptIncludes() public méthode

Get the TypoScript resources that are included before the site TypoScript.
public getPrependTypoScriptIncludes ( ) : array
Résultat array

getTypoScriptIncludes() protected méthode

Concatenate the given TypoScript resources with include statements
protected getTypoScriptIncludes ( array $typoScriptResources ) : string
$typoScriptResources array An array of TypoScript resource URIs
Résultat string A string of include statements for all resources

initializeObject() public méthode

Initializes the parser
public initializeObject ( ) : void
Résultat void

prepareAutoIncludeTypoScript() protected méthode

Prepares an array with TypoScript paths to auto include before the Site TypoScript.
protected prepareAutoIncludeTypoScript ( ) : array
Résultat array

readExternalTypoScriptFile() protected méthode

If it doesn't exist, this function will just return an empty string.
protected readExternalTypoScriptFile ( string $pathAndFilename ) : string
$pathAndFilename string Path and filename of the TypoScript file
Résultat string The content of the .fusion file, plus one chr(10) at the end

setAppendTypoScriptIncludes() public méthode

Set TypoScript resources that should be appended after the site TypoScript, this defaults to an empty array.
public setAppendTypoScriptIncludes ( array $appendTypoScriptIncludes ) : void
$appendTypoScriptIncludes array An array of TypoScript resource URIs
Résultat void

setPrependTypoScriptIncludes() public méthode

Set TypoScript resources that should be prepended before the site TypoScript, it defaults to the Neos Root.fusion TypoScript.
public setPrependTypoScriptIncludes ( array $prependTypoScriptIncludes ) : void
$prependTypoScriptIncludes array
Résultat void

setSiteRootTypoScriptPattern() public méthode

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
Résultat void

Property Details

$appendTypoScriptIncludes protected_oe property

Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
protected array $appendTypoScriptIncludes
Résultat array

$autoIncludeConfiguration protected_oe property

protected array $autoIncludeConfiguration
Résultat array

$autoIncludeTypoScriptPattern protected_oe property

Pattern used for determining the TypoScript root file for autoIncludes
protected string $autoIncludeTypoScriptPattern
Résultat string

$legacyAutoIncludeTypoScriptPattern protected_oe property

Legacy pattern used for determining the TypoScript root file for autoIncludes
Deprecation: since 3.0 will be removed in 4.0
protected string $legacyAutoIncludeTypoScriptPattern
Résultat string

$legacySiteRootTypoScriptPattern protected_oe property

Legacy pattern used for determining the TypoScript root file for a site
Deprecation: since 3.0 will be removed in 4.0
protected string $legacySiteRootTypoScriptPattern
Résultat string

$nodeTypeManager protected_oe property

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Résultat Neos\ContentRepository\Domain\Service\NodeTypeManager

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$packageManager protected_oe property

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Résultat Neos\Flow\Package\PackageManagerInterface

$prependTypoScriptIncludes protected_oe property

Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
protected array $prependTypoScriptIncludes
Résultat array

$siteRootTypoScriptPattern protected_oe property

Pattern used for determining the TypoScript root file for a site
protected string $siteRootTypoScriptPattern
Résultat string

$typoScriptParser protected_oe property

protected Parser,Neos\Fusion\Core $typoScriptParser
Résultat Neos\Fusion\Core\Parser