PHP Class Neos\ContentRepository\Domain\Service\NodeTypeManager

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$cachedNodeTypes array Node types, indexed by name
$cachedSubNodeTypes array Node types, indexed by supertype
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$fallbackNodeTypeName string
$fullConfigurationCache Neos\Cache\Frontend\StringFrontend
$fullNodeTypeConfigurations array

Public Methods

Method Description
createNodeType ( string $nodeTypeName ) : NodeType Creates a new node type
getNodeType ( string $nodeTypeName ) : NodeType Returns the specified node type (which could be abstract)
getNodeTypes ( boolean $includeAbstractNodeTypes = true ) : array Return all registered node types.
getSubNodeTypes ( string $superTypeName, boolean $includeAbstractNodeTypes = true ) : array Return all non-abstract node types which have a certain $superType, without the $superType itself.
hasNodeType ( string $nodeTypeName ) : boolean Checks if the specified node type exists
overrideNodeTypes ( array $completeNodeTypeConfiguration ) : void This method can be used by Functional of Behavioral Tests to completely override the node types known in the system.

Protected Methods

Method Description
evaluateSuperTypeConfiguration ( string $superTypeName, boolean $enabled, array &$completeNodeTypeConfiguration ) : NodeType Evaluates a single superType configuration and returns the NodeType if enabled.
evaluateSuperTypesConfiguration ( array $superTypesConfiguration, array &$completeNodeTypeConfiguration ) : array Evaluates the given superTypes configuation and returns the array of effective superTypes.
loadNodeType ( string $nodeTypeName, array &$completeNodeTypeConfiguration, array $fullNodeTypeConfigurationForType = null ) : NodeType Load one node type, if it is not loaded yet.
loadNodeTypes ( ) : void Loads all node types into memory.

Method Details

createNodeType() public method

Creates a new node type
public createNodeType ( string $nodeTypeName ) : NodeType
$nodeTypeName string Unique name of the new node type. Example: "Neos.Neos:Page"
return Neos\ContentRepository\Domain\Model\NodeType

evaluateSuperTypeConfiguration() protected method

Evaluates a single superType configuration and returns the NodeType if enabled.
protected evaluateSuperTypeConfiguration ( string $superTypeName, boolean $enabled, array &$completeNodeTypeConfiguration ) : NodeType
$superTypeName string
$enabled boolean
$completeNodeTypeConfiguration array
return Neos\ContentRepository\Domain\Model\NodeType

evaluateSuperTypesConfiguration() protected method

Evaluates the given superTypes configuation and returns the array of effective superTypes.
protected evaluateSuperTypesConfiguration ( array $superTypesConfiguration, array &$completeNodeTypeConfiguration ) : array
$superTypesConfiguration array
$completeNodeTypeConfiguration array
return array

getNodeType() public method

Returns the specified node type (which could be abstract)
public getNodeType ( string $nodeTypeName ) : NodeType
$nodeTypeName string
return Neos\ContentRepository\Domain\Model\NodeType or NULL

getNodeTypes() public method

Return all registered node types.
public getNodeTypes ( boolean $includeAbstractNodeTypes = true ) : array
$includeAbstractNodeTypes boolean Whether to include abstract node types, defaults to TRUE
return array

getSubNodeTypes() public method

Return all non-abstract node types which have a certain $superType, without the $superType itself.
public getSubNodeTypes ( string $superTypeName, boolean $includeAbstractNodeTypes = true ) : array
$superTypeName string
$includeAbstractNodeTypes boolean Whether to include abstract node types, defaults to TRUE
return array

hasNodeType() public method

Checks if the specified node type exists
public hasNodeType ( string $nodeTypeName ) : boolean
$nodeTypeName string Name of the node type
return boolean TRUE if it exists, otherwise FALSE

loadNodeType() protected method

Load one node type, if it is not loaded yet.
protected loadNodeType ( string $nodeTypeName, array &$completeNodeTypeConfiguration, array $fullNodeTypeConfigurationForType = null ) : NodeType
$nodeTypeName string
$completeNodeTypeConfiguration array the full node type configuration for all node types
$fullNodeTypeConfigurationForType array
return Neos\ContentRepository\Domain\Model\NodeType

loadNodeTypes() protected method

Loads all node types into memory.
protected loadNodeTypes ( ) : void
return void

overrideNodeTypes() public method

In order to reset the node type override, an empty array can be passed in. In this case, the system-node-types are used again.
public overrideNodeTypes ( array $completeNodeTypeConfiguration ) : void
$completeNodeTypeConfiguration array
return void

Property Details

$cachedNodeTypes protected property

Node types, indexed by name
protected array $cachedNodeTypes
return array

$cachedSubNodeTypes protected property

Node types, indexed by supertype
protected array $cachedSubNodeTypes
return array

$configurationManager protected property

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
return Neos\Flow\Configuration\ConfigurationManager

$fallbackNodeTypeName protected property

protected string $fallbackNodeTypeName
return string

$fullConfigurationCache protected property

protected StringFrontend,Neos\Cache\Frontend $fullConfigurationCache
return Neos\Cache\Frontend\StringFrontend

$fullNodeTypeConfigurations protected property

protected array $fullNodeTypeConfigurations
return array