NodeTypeManager
class NodeTypeManager (View source)
Manager for node types
Properties
protected array | $cachedNodeTypes | Node types, indexed by name |
|
protected array | $cachedSubNodeTypes | Node types, indexed by supertype (also including abstract node types) |
|
protected ConfigurationManager | $configurationManager | ||
protected string | $fallbackNodeTypeName | ||
protected array | $fullNodeTypeConfigurations |
Methods
Return all registered node types.
Return all non-abstract node types which have a certain $superType, without the $superType itself.
Returns the specified node type (which could be abstract)
Checks if the specified node type exists
Creates a new node type
Loads all node types into memory.
This method can be used by Functional of Behavioral Tests to completely override the node types known in the system.
Load one node type, if it is not loaded yet.
Evaluates the given superTypes configuation and returns the array of effective superTypes.
Evaluates a single superType configuration and returns the NodeType if enabled.
Details
NodeType[]
getNodeTypes(bool $includeAbstractNodeTypes = true)
Return all registered node types.
NodeType[]
getSubNodeTypes(string $superTypeName, bool $includeAbstractNodeTypes = true)
Return all non-abstract node types which have a certain $superType, without the $superType itself.
NodeType
getNodeType(string $nodeTypeName)
Returns the specified node type (which could be abstract)
bool
hasNodeType(string $nodeTypeName)
Checks if the specified node type exists
NodeType
createNodeType(string $nodeTypeName)
Creates a new node type
protected void
loadNodeTypes()
Loads all node types into memory.
void
overrideNodeTypes(array $completeNodeTypeConfiguration)
This method can be used by Functional of Behavioral Tests to completely override the node types known in the system.
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.
protected NodeType
loadNodeType(string $nodeTypeName, array $completeNodeTypeConfiguration)
Load one node type, if it is not loaded yet.
protected array
evaluateSuperTypesConfiguration(array $superTypesConfiguration, array $completeNodeTypeConfiguration)
Evaluates the given superTypes configuation and returns the array of effective superTypes.
protected NodeType
evaluateSuperTypeConfiguration(string $superTypeName, bool $enabled, array $completeNodeTypeConfiguration)
Evaluates a single superType configuration and returns the NodeType if enabled.