PHP Класс Neos\Neos\Domain\Service\TypoScriptService

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Описание методов

createRuntime() публичный метод

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
Результат Neos\Fusion\Core\Runtime

generateNodeTypeDefinitions() защищенный метод

Only fully qualified node types (e.g. MyVendor.MyPackage:NodeType) will be considered.
protected generateNodeTypeDefinitions ( ) : string
Результат string

generateTypoScriptForNodeType() защищенный метод

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
Результат string

getAppendTypoScriptIncludes() публичный метод

Get TypoScript resources that will be appended after the site TypoScript.
public getAppendTypoScriptIncludes ( ) : array
Результат array

getMergedTypoScriptObjectTree() публичный метод

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
Результат array The merged object tree as of the given node

getPrependTypoScriptIncludes() публичный метод

Get the TypoScript resources that are included before the site TypoScript.
public getPrependTypoScriptIncludes ( ) : array
Результат array

getTypoScriptIncludes() защищенный метод

Concatenate the given TypoScript resources with include statements
protected getTypoScriptIncludes ( array $typoScriptResources ) : string
$typoScriptResources array An array of TypoScript resource URIs
Результат string A string of include statements for all resources

initializeObject() публичный метод

Initializes the parser
public initializeObject ( ) : void
Результат void

prepareAutoIncludeTypoScript() защищенный метод

Prepares an array with TypoScript paths to auto include before the Site TypoScript.
protected prepareAutoIncludeTypoScript ( ) : array
Результат array

readExternalTypoScriptFile() защищенный метод

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
Результат string The content of the .fusion file, plus one chr(10) at the end

setAppendTypoScriptIncludes() публичный метод

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
Результат void

setPrependTypoScriptIncludes() публичный метод

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
Результат void

setSiteRootTypoScriptPattern() публичный метод

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
Результат void

Описание свойств

$appendTypoScriptIncludes защищенное свойство

Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
protected array $appendTypoScriptIncludes
Результат array

$autoIncludeConfiguration защищенное свойство

protected array $autoIncludeConfiguration
Результат array

$autoIncludeTypoScriptPattern защищенное свойство

Pattern used for determining the TypoScript root file for autoIncludes
protected string $autoIncludeTypoScriptPattern
Результат string

$legacyAutoIncludeTypoScriptPattern защищенное свойство

Legacy pattern used for determining the TypoScript root file for autoIncludes
Устаревший: since 3.0 will be removed in 4.0
protected string $legacyAutoIncludeTypoScriptPattern
Результат string

$legacySiteRootTypoScriptPattern защищенное свойство

Legacy pattern used for determining the TypoScript root file for a site
Устаревший: since 3.0 will be removed in 4.0
protected string $legacySiteRootTypoScriptPattern
Результат string

$nodeTypeManager защищенное свойство

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
Результат Neos\ContentRepository\Domain\Service\NodeTypeManager

$objectManager защищенное свойство

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Результат Neos\Flow\ObjectManagement\ObjectManagerInterface

$packageManager защищенное свойство

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Результат Neos\Flow\Package\PackageManagerInterface

$prependTypoScriptIncludes защищенное свойство

Example: array( 'resources://MyVendor.MyPackageKey/Private/TypoScript/Root.fusion', 'resources://SomeVendor.OtherPackage/Private/TypoScript/Root.fusion' )
protected array $prependTypoScriptIncludes
Результат array

$siteRootTypoScriptPattern защищенное свойство

Pattern used for determining the TypoScript root file for a site
protected string $siteRootTypoScriptPattern
Результат string

$typoScriptParser защищенное свойство

protected Parser,Neos\Fusion\Core $typoScriptParser
Результат Neos\Fusion\Core\Parser