PHP 클래스 Neos\ContentRepository\Domain\Model\NodeType

Although methods contained in this class belong to the public API, you should not need to deal with creating or managing node types manually. New node types should be defined in a NodeTypes.yaml file.
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$abstract boolean Is this node type marked abstract
$declaredSuperTypes array<\Neos\ContentRepository\Domain\Model\NodeType> node types this node type directly inherits from
$final boolean Is this node type marked final
$fullConfiguration array Full configuration for this node type, can be an arbitrarily nested array. Includes any inherited configuration.
$initialized boolean Whether or not this node type has been initialized (e.g. if it has been postprocessed)
$localConfiguration array Configuration for this node type, can be an arbitrarily nested array. Does not include inherited configuration.
$name string Name of this node type. Example: "ContentRepository:Folder"
$nodeLabelGenerator Neos\ContentRepository\Domain\Model\NodeDataLabelGeneratorInterface | Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface
$nodeTypeManager Neos\ContentRepository\Domain\Service\NodeTypeManager
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface

공개 메소드들

메소드 설명
__call ( string $methodName, array $arguments ) : mixed Magic get* and has* method for all properties inside $configuration.
__construct ( string $name, array $declaredSuperTypes, array $configuration, array $fullConfiguration = null ) Constructs this node type
__toString ( ) : string Alias for getName().
allowsChildNodeType ( NodeType $nodeType ) : boolean Checks if the given NodeType is acceptable as sub-node with the configured constraints, not taking constraints of auto-created nodes into account. Thus, this method only returns the correct result if called on NON-AUTO-CREATED nodes!
allowsGrandchildNodeType ( string $childNodeName, NodeType $nodeType ) : boolean Checks if the given $nodeType is allowed as a childNode of the given $childNodeName (which must be auto-created in $this NodeType).
getAutoCreatedChildNodes ( ) : array Return an array with child nodes which should be automatically created
getConfiguration ( string $configurationPath ) : mixed Returns the configuration option with the specified $configurationPath or NULL if it does not exist
getDeclaredSuperTypes ( ) : array Returns the direct, explicitly declared super types of this node type.
getDefaultValuesForProperties ( ) : array Return an array with the defined default values for each property, if any.
getFullConfiguration ( ) : array Get the full configuration of the node type. Should only be used internally.
getLabel ( ) : string Get the human-readable label of this node type
getLocalConfiguration ( ) : array Get the local configuration of the node type. Should only be used internally.
getName ( ) : string Returns the name of this node type
getNodeLabelGenerator ( ) : Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface Return the node label generator class for the given node
getOptions ( ) : array Get additional options (if specified)
getProperties ( ) : array Return the array with the defined properties. The key is the property name, the value the property configuration. There are no guarantees on how the property configuration looks like.
getPropertyType ( string $propertyName ) : string Returns the configured type of the specified property
hasConfiguration ( string $configurationPath ) : boolean Checks if the configuration of this node type contains a setting for the given $configurationPath
isAbstract ( ) : boolean Return boolean TRUE if marked abstract
isAggregate ( ) : boolean Returns whether this node type (or any parent type) is an *aggregate*.
isFinal ( ) : boolean Return boolean TRUE if marked final
isOfType ( string $nodeType ) : boolean If this node type or any of the direct or indirect super types has the given name.

보호된 메소드들

메소드 설명
addInheritedSuperTypes ( array &$superTypes, NodeType $superType ) : void Recursively add super types
applyPostprocessing ( ) : void Iterates through configured postprocessors and invokes them
buildFullConfiguration ( ) : void Builds the full configuration by merging configuration from the supertypes into the local configuration.
buildInheritanceChain ( ) : array Returns a flat list of super types to inherit from.
initialize ( ) : void Initializes this node type
isNodeTypeAllowedByConstraints ( NodeType $nodeType, array $constraints ) : boolean Internal method to check whether the passed-in $nodeType is allowed by the $constraints array.
isNodeTypeAllowedByDirectConstraints ( NodeType $nodeType, array $constraints ) : boolean
isNodeTypeAllowedByInheritanceConstraints ( NodeType $nodeType, array $constraints ) : boolean | null This method loops over the constraints and finds node types that the given node type inherits from. For all matched super types, their super types are traversed to find the closest super node with a constraint which is used to evaluated if the node type is allowed. It finds the closest results for true and false, and uses the distance to choose which one wins (lowest). If no result is found the node type is allowed.
traverseSuperTypes ( NodeType $currentNodeType, string $constraintNodeTypeName, integer $distance ) : integer This method traverses the given node type to find the first super type that matches the constraint node type.

메소드 상세

__call() 공개 메소드

Magic get* and has* method for all properties inside $configuration.
사용 중단: Use hasConfiguration() or getConfiguration() instead
public __call ( string $methodName, array $arguments ) : mixed
$methodName string
$arguments array
리턴 mixed

__construct() 공개 메소드

Constructs this node type
public __construct ( string $name, array $declaredSuperTypes, array $configuration, array $fullConfiguration = null )
$name string Name of the node type
$declaredSuperTypes array Parent types of this node type
$configuration array the configuration for this node type which is defined in the schema
$fullConfiguration array

__toString() 공개 메소드

Alias for getName().
public __toString ( ) : string
리턴 string

addInheritedSuperTypes() 보호된 메소드

Recursively add super types
protected addInheritedSuperTypes ( array &$superTypes, NodeType $superType ) : void
$superTypes array
$superType NodeType
리턴 void

allowsChildNodeType() 공개 메소드

Otherwise, allowsGrandchildNodeType() needs to be called on the *parent node type*.
public allowsChildNodeType ( NodeType $nodeType ) : boolean
$nodeType NodeType
리턴 boolean TRUE if the $nodeType is allowed as child node, FALSE otherwise.

allowsGrandchildNodeType() 공개 메소드

Only allowed to be called if $childNodeName is auto-created.
public allowsGrandchildNodeType ( string $childNodeName, NodeType $nodeType ) : boolean
$childNodeName string The name of a configured childNode of this NodeType
$nodeType NodeType The NodeType to check constraints for.
리턴 boolean TRUE if the $nodeType is allowed as grandchild node, FALSE otherwise.

applyPostprocessing() 보호된 메소드

Iterates through configured postprocessors and invokes them
protected applyPostprocessing ( ) : void
리턴 void

buildFullConfiguration() 보호된 메소드

Builds the full configuration by merging configuration from the supertypes into the local configuration.
protected buildFullConfiguration ( ) : void
리턴 void

buildInheritanceChain() 보호된 메소드

Returns a flat list of super types to inherit from.
protected buildInheritanceChain ( ) : array
리턴 array

getAutoCreatedChildNodes() 공개 메소드

Return an array with child nodes which should be automatically created
public getAutoCreatedChildNodes ( ) : array
리턴 array the key of this array is the name of the child, and the value its NodeType.

getConfiguration() 공개 메소드

Returns the configuration option with the specified $configurationPath or NULL if it does not exist
public getConfiguration ( string $configurationPath ) : mixed
$configurationPath string The name of the configuration option to retrieve
리턴 mixed

getDeclaredSuperTypes() 공개 메소드

Note: NULL values are skipped since they are used only internally.
public getDeclaredSuperTypes ( ) : array
리턴 array

getDefaultValuesForProperties() 공개 메소드

The default value is configured for each property under the "default" key.

getFullConfiguration() 공개 메소드

Instead, use the hasConfiguration()/getConfiguration() methods to check/retrieve single configuration values.
public getFullConfiguration ( ) : array
리턴 array

getLabel() 공개 메소드

Get the human-readable label of this node type
public getLabel ( ) : string
리턴 string

getLocalConfiguration() 공개 메소드

Note: post processing is not applied to this.
public getLocalConfiguration ( ) : array
리턴 array

getName() 공개 메소드

Returns the name of this node type
public getName ( ) : string
리턴 string

getNodeLabelGenerator() 공개 메소드

Return the node label generator class for the given node
public getNodeLabelGenerator ( ) : Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface
리턴 Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface

getOptions() 공개 메소드

Get additional options (if specified)
public getOptions ( ) : array
리턴 array

getProperties() 공개 메소드

Return the array with the defined properties. The key is the property name, the value the property configuration. There are no guarantees on how the property configuration looks like.
public getProperties ( ) : array
리턴 array

getPropertyType() 공개 메소드

Returns the configured type of the specified property
public getPropertyType ( string $propertyName ) : string
$propertyName string Name of the property
리턴 string

hasConfiguration() 공개 메소드

Checks if the configuration of this node type contains a setting for the given $configurationPath
public hasConfiguration ( string $configurationPath ) : boolean
$configurationPath string The name of the configuration option to verify
리턴 boolean

initialize() 보호된 메소드

Initializes this node type
protected initialize ( ) : void
리턴 void

isAbstract() 공개 메소드

Return boolean TRUE if marked abstract
public isAbstract ( ) : boolean
리턴 boolean

isAggregate() 공개 메소드

The most prominent *aggregate* is a Document and everything which inherits from it, like a Page. If a node type is marked as aggregate, it means that: - the node type can "live on its own", i.e. can be part of an external URL - when moving this node, all node variants are also moved (across all dimensions) - Recursive copying only happens *inside* this aggregate, and stops at nested aggregates.
public isAggregate ( ) : boolean
리턴 boolean TRUE if the node type is an aggregate

isFinal() 공개 메소드

Return boolean TRUE if marked final
public isFinal ( ) : boolean
리턴 boolean

isNodeTypeAllowedByConstraints() 보호된 메소드

$constraints is an associative array where the key is the Node Type Name. If the value is "TRUE", the node type is explicitly allowed. If the value is "FALSE", the node type is explicitly denied. If nothing is specified, the fallback "*" is used. If that one is also not specified, we DENY by default. Super types of the given node types are also checked, so if a super type is constrained it will also take affect on the inherited node types. The closest constrained super type match is used.
protected isNodeTypeAllowedByConstraints ( NodeType $nodeType, array $constraints ) : boolean
$nodeType NodeType
$constraints array
리턴 boolean

isNodeTypeAllowedByDirectConstraints() 보호된 메소드

protected isNodeTypeAllowedByDirectConstraints ( NodeType $nodeType, array $constraints ) : boolean
$nodeType NodeType
$constraints array
리턴 boolean TRUE if the passed $nodeType is allowed by the $constraints

isNodeTypeAllowedByInheritanceConstraints() 보호된 메소드

This method loops over the constraints and finds node types that the given node type inherits from. For all matched super types, their super types are traversed to find the closest super node with a constraint which is used to evaluated if the node type is allowed. It finds the closest results for true and false, and uses the distance to choose which one wins (lowest). If no result is found the node type is allowed.
protected isNodeTypeAllowedByInheritanceConstraints ( NodeType $nodeType, array $constraints ) : boolean | null
$nodeType NodeType
$constraints array
리턴 boolean | null if no constraint matched

isOfType() 공개 메소드

If this node type or any of the direct or indirect super types has the given name.
public isOfType ( string $nodeType ) : boolean
$nodeType string
리턴 boolean TRUE if this node type is of the given kind, otherwise FALSE

traverseSuperTypes() 보호된 메소드

In case the hierarchy has more than one way of finding a path to the node type it's not taken into account, since the first matched is returned. This is accepted on purpose for performance reasons and due to the fact that such hierarchies should be avoided.
protected traverseSuperTypes ( NodeType $currentNodeType, string $constraintNodeTypeName, integer $distance ) : integer
$currentNodeType NodeType
$constraintNodeTypeName string
$distance integer
리턴 integer or NULL if no NodeType matched

프로퍼티 상세

$abstract 보호되어 있는 프로퍼티

Is this node type marked abstract
protected bool $abstract
리턴 boolean

$declaredSuperTypes 보호되어 있는 프로퍼티

node types this node type directly inherits from
protected array<\Neos\ContentRepository\Domain\Model\NodeType> $declaredSuperTypes
리턴 array<\Neos\ContentRepository\Domain\Model\NodeType>

$final 보호되어 있는 프로퍼티

Is this node type marked final
protected bool $final
리턴 boolean

$fullConfiguration 보호되어 있는 프로퍼티

Full configuration for this node type, can be an arbitrarily nested array. Includes any inherited configuration.
protected array $fullConfiguration
리턴 array

$initialized 보호되어 있는 프로퍼티

Whether or not this node type has been initialized (e.g. if it has been postprocessed)
protected bool $initialized
리턴 boolean

$localConfiguration 보호되어 있는 프로퍼티

Configuration for this node type, can be an arbitrarily nested array. Does not include inherited configuration.
protected array $localConfiguration
리턴 array

$name 보호되어 있는 프로퍼티

Name of this node type. Example: "ContentRepository:Folder"
protected string $name
리턴 string

$nodeLabelGenerator 보호되어 있는 프로퍼티

protected NodeDataLabelGeneratorInterface,Neos\ContentRepository\Domain\Model|NodeLabelGeneratorInterface,Neos\ContentRepository\Domain\Model $nodeLabelGenerator
리턴 Neos\ContentRepository\Domain\Model\NodeDataLabelGeneratorInterface | Neos\ContentRepository\Domain\Model\NodeLabelGeneratorInterface

$nodeTypeManager 보호되어 있는 프로퍼티

protected NodeTypeManager,Neos\ContentRepository\Domain\Service $nodeTypeManager
리턴 Neos\ContentRepository\Domain\Service\NodeTypeManager

$objectManager 보호되어 있는 프로퍼티

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface