PHP Class Neos\ContentRepository\Domain\Model\Node

Inheritance: implements Neos\ContentRepository\Domain\Model\NodeInterface, implements Neos\Cache\CacheAwareInterface
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$context Neos\ContentRepository\Domain\Service\Context
$contextFactory Neos\ContentRepository\Domain\Service\ContextFactoryInterface
$nodeData NodeData The NodeData entity this version is for.
$nodeDataIsMatchingContext boolean Defines if the NodeData represented by this Node is already in the same context or if it is currently just "shining through".
$nodeDataRepository Neos\ContentRepository\Domain\Repository\NodeDataRepository
$nodeFactory Neos\ContentRepository\Domain\Factory\NodeFactory
$nodeService Neos\ContentRepository\Domain\Service\NodeServiceInterface
$propertyMapper Neos\Flow\Property\PropertyMapper

Méthodes publiques

Méthode Description
__construct ( NodeData $nodeData, Context $context )
__toString ( ) : string For debugging purposes, the node can be converted to a string.
copyAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface Copies this node after the given node
copyBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface Copies this node before the given node
copyInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface Copies this node into the given node
createNode ( string $name, NodeType $nodeType = null, string $identifier = null ) : Neos\ContentRepository\Domain\Model\NodeInterface Creates, adds and returns a child node of this node. Also sets default properties and creates default subnodes.
createNodeFromTemplate ( NodeTemplate $nodeTemplate, string $nodeName = null ) : Neos\ContentRepository\Domain\Model\NodeInterface Creates and persists a node from the given $nodeTemplate as child node
createSingleNode ( string $name, NodeType $nodeType = null, string $identifier = null ) : Node Creates, adds and returns a child node of this node, without setting default properties or creating subnodes. Only used internally.
createVariantForContext ( Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface Given a context a new node is returned that is like this node, but lives in the new context.
dimensionsAreMatchingTargetDimensionValues ( ) : boolean Internal method
getAccessRoles ( ) : array Returns the names of defined access roles
getCacheEntryIdentifier ( ) : string Returns a string which distinctly identifies this object and thus can be used as an identifier for cache entries related to this object.
getChildNodes ( string $nodeTypeFilter = null, integer $limit = null, integer $offset = null ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface> Returns all direct child nodes of this node.
getContentObject ( ) : object Returns the content object of this node (if any).
getContext ( ) : Context Returns the context this node operates in.
getContextPath ( ) : string Returns the absolute path of this node with additional context information (such as the workspace name).
getCreationDateTime ( ) : DateTimeInterface
getDepth ( ) : integer Returns the level at which this node is located.
getDimensions ( ) : array Return the assigned content dimensions of the node.
getFullLabel ( ) : string Returns a full length plain text description of this node
getHiddenAfterDateTime ( ) : DateTime Returns the date and time after which this node will be automatically hidden.
getHiddenBeforeDateTime ( ) : DateTime Returns the date and time before which this node will be automatically hidden.
getIdentifier ( ) : string Returns the identifier of this node
getIndex ( ) : integer Returns the index of this node which determines the order among siblings with the same parent node.
getLabel ( ) : string Returns the node label as generated by the configured node label generator
getLastModificationDateTime ( ) : DateTimeInterface
getLastPublicationDateTime ( ) : DateTime
getName ( ) : string Returns the name of this node
getNode ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns a node specified by the given relative path.
getNodeData ( ) : NodeData
getNodeType ( ) : NodeType Returns the node type of this node.
getNumberOfChildNodes ( string $nodeTypeFilter = null ) : integer Returns the number of child nodes a similar getChildNodes() call would return.
getOtherNodeVariants ( )
getParent ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the parent node of this node
getParentPath ( ) : string Returns the parent node path
getPath ( ) : string Returns the path of this node
getPrimaryChildNode ( ) : Node Returns the primary child node of this node.
getProperties ( boolean $returnNodesAsIdentifiers = false ) : array Returns all properties of this node.
getProperty ( string $propertyName, boolean $returnNodesAsIdentifiers = false ) : mixed Returns the specified property.
getPropertyNames ( ) : array Returns the names of all properties of this node.
getWorkspace ( ) : Workspace Returns the workspace this node is contained in
hasAccessRestrictions ( ) : boolean Tells if a node, in general, has access restrictions, independent of the current security context.
hasChildNodes ( string $nodeTypeFilter = null ) : boolean Checks if this node has any child nodes.
hasProperty ( string $propertyName ) : boolean If this node has a property with the given name.
isAccessible ( ) : boolean Tells if this node may be accessed according to the current security context.
isAutoCreated ( ) : boolean Determine if this node is configured as auto-created childNode of the parent node. If that is the case, it should not be deleted.
isHidden ( ) : boolean Returns the current state of the hidden flag
isHiddenInIndex ( ) : boolean If this node should be hidden in indexes
isNodeTypeAllowedAsChildNode ( NodeType $nodeType ) : boolean Checks if the given $nodeType would be allowed as a child node of this node according to the configured constraints.
isRemoved ( ) : boolean If this node is a removed node.
isVisible ( ) : boolean Tells if this node is "visible".
moveAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null ) Moves this node after the given node
moveBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null ) Moves this node before the given node
moveInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null ) Moves this node into the given node
remove ( ) : void Removes this node and all its child nodes. This is an alias for setRemoved(TRUE)
removeProperty ( string $propertyName ) : void Removes the specified property.
setAccessRoles ( array $accessRoles ) : void Sets the roles which are required to access this node
setContentObject ( object $contentObject ) : void Sets a content object for this node.
setHidden ( boolean $hidden ) : void Sets the "hidden" flag for this node.
setHiddenAfterDateTime ( DateTime $dateTime = null ) : void Sets the date and time when this node should be automatically hidden
setHiddenBeforeDateTime ( DateTime $dateTime = null ) : void Sets the date and time when this node becomes potentially visible.
setHiddenInIndex ( boolean $hidden ) : void Sets if this node should be hidden in indexes, such as a site navigation.
setIndex ( integer $index ) : void Sets the index of this node
setLastPublicationDateTime ( DateTimeInterface $lastModificationDateTime ) : void
setName ( string $newName ) : void Set the name of the node to $newName, keeping its position as it is.
setNodeData ( NodeData $nodeData ) : void Set the associated NodeData in regards to the Context.
setNodeDataIsMatchingContext ( boolean $status ) : void Set the status of the associated NodeData in regards to the Context.
setNodeType ( NodeType $nodeType ) : void Sets the node type of this node.
setProperty ( string $propertyName, mixed $value ) : mixed Sets the specified property.
setRemoved ( boolean $removed ) : void Enables using the remove method when only setters are available
setWorkspace ( Workspace $workspace ) : void Sets the workspace of this node.
similarize ( Neos\ContentRepository\Domain\Model\NodeInterface $sourceNode, boolean $isCopy = false ) : void For internal use in createRecursiveCopy.
unsetContentObject ( ) : void Unsets the content object of this node.

Méthodes protégées

Méthode Description
copyIntoInternal ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, $nodeName, boolean $detachedCopy ) : Neos\ContentRepository\Domain\Model\NodeInterface Internal method to do the actual copying.
createNodeForVariant ( NodeData $nodeData ) : Node Create a node for the given NodeData, given that it is a variant of the current node
createRecursiveCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName, boolean $detachedCopy ) : Neos\ContentRepository\Domain\Model\NodeInterface Create a recursive copy of this node below $referenceNode with $nodeName.
emitAfterNodeCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $copiedNode, Neos\ContentRepository\Domain\Model\NodeInterface $targetParentNode ) : void
emitAfterNodeCreate ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Signals that a node was created.
emitAfterNodeMove ( Neos\ContentRepository\Domain\Model\NodeInterface $movedNode, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, integer $movePosition ) : void
emitBeforeNodeCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $sourceNode, Neos\ContentRepository\Domain\Model\NodeInterface $targetParentNode ) : void
emitBeforeNodeCreate ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $name, string $nodeType, string $identifier ) : void Signals that a node will be created.
emitBeforeNodeMove ( Neos\ContentRepository\Domain\Model\NodeInterface $movedNode, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, integer $movePosition ) : void
emitBeforeNodePropertyChange ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $newValue ) : void Signals that the property of a node will be changed.
emitNodeAdded ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Signals that a node was added.
emitNodePathChanged ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $oldPath, string $newPath, boolean $recursion ) Signals that the node path has been changed.
emitNodePropertyChanged ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $newValue ) : void Signals that the property of a node was changed.
emitNodeRemoved ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Signals that a node was removed.
emitNodeUpdated ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void Signals that a node was updated.
isNodeDataMatchingContext ( ) : boolean The NodeData matches the context if the workspace matches exactly.
isNodePathAvailable ( string $path ) : boolean Checks if the given node path is available for this node, so either no node with this path exists or an existing node has the same identifier.
materializeNodeData ( ) : void Materializes the original node data (of a different workspace) into the current workspace.
moveNodeData ( NodeData $nodeData, string $originalPath, string $destinationPath, boolean $recursiveCall ) : array | null Moves a NodeData object that is either a variant or child node to the given destination path.
moveNodeToDestinationPath ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $destinationPath ) : void Moves the given node to the destination path by modifying the underlaying NodeData object.
moveVariantOrChild ( string $aggregateOriginalPath, string $aggregateDestinationPath, Neos\ContentRepository\Domain\Model\NodeInterface $nodeToMove = null ) : array Moves the given variant or child node to the destination defined by the given path which is the new path for the originally moved (parent|variant) node
resolvePropertyReferences ( array $value = [] ) : array Maps the property value (an array of node identifiers) to the Node objects if needed.
setPath ( string $path, boolean $checkForExistence = true ) : void Sets the absolute path of this node.
setPathInternal ( string $destinationPath, boolean $recursiveCall ) : array Moves a node and sub nodes to the new path.
setPathInternalForAggregate ( string $destinationPath, boolean $recursiveCall ) : array Moves a node and sub nodes to the new path given with special logic for aggregate node types.
willChildNodeBeAutoCreated ( string $name ) : boolean Checks if the given Node $name is configured as auto-created childNode in the NodeType configuration.

Method Details

__construct() public méthode

public __construct ( NodeData $nodeData, Context $context )
$nodeData NodeData
$context Neos\ContentRepository\Domain\Service\Context

__toString() public méthode

For debugging purposes, the node can be converted to a string.
public __toString ( ) : string
Résultat string

copyAfter() public méthode

Copies this node after the given node
public copyAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeName string
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

copyBefore() public méthode

Copies this node before the given node
public copyBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeName string
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

copyInto() public méthode

Copies this node into the given node
public copyInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeName string
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

copyIntoInternal() protected méthode

For behavior of the $detachedCopy parameter, see method Node::createRecursiveCopy().
protected copyIntoInternal ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, $nodeName, boolean $detachedCopy ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeName
$detachedCopy boolean
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

createNode() public méthode

Creates, adds and returns a child node of this node. Also sets default properties and creates default subnodes.
public createNode ( string $name, NodeType $nodeType = null, string $identifier = null ) : Neos\ContentRepository\Domain\Model\NodeInterface
$name string Name of the new node
$nodeType NodeType Node type of the new node (optional)
$identifier string The identifier of the node, unique within the workspace, optional(!)
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

createNodeForVariant() protected méthode

Create a node for the given NodeData, given that it is a variant of the current node
protected createNodeForVariant ( NodeData $nodeData ) : Node
$nodeData NodeData
Résultat Node

createNodeFromTemplate() public méthode

Creates and persists a node from the given $nodeTemplate as child node
public createNodeFromTemplate ( NodeTemplate $nodeTemplate, string $nodeName = null ) : Neos\ContentRepository\Domain\Model\NodeInterface
$nodeTemplate NodeTemplate
$nodeName string name of the new node. If not specified the name of the nodeTemplate will be used.
Résultat Neos\ContentRepository\Domain\Model\NodeInterface the freshly generated node

createRecursiveCopy() protected méthode

$detachedCopy only has an influence if we are copying from one dimension to the other, possibly creating a new node variant: - If $detachedCopy is TRUE, the whole (recursive) copy is done without connecting original and copied node, so NOT CREATING a new node variant. - If $detachedCopy is FALSE, and the node does not yet have a variant in the target dimension, we are CREATING a new node variant. As a caller of this method, $detachedCopy should be TRUE if $this->getNodeType()->isAggregate() is TRUE, and FALSE otherwise.
protected createRecursiveCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $nodeName, boolean $detachedCopy ) : Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeName string
$detachedCopy boolean
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

createSingleNode() public méthode

For internal use only! TODO: New SiteImportService uses createNode() and DQL. When we drop the LegagcySiteImportService we can change this to protected.
public createSingleNode ( string $name, NodeType $nodeType = null, string $identifier = null ) : Node
$name string Name of the new node
$nodeType NodeType Node type of the new node (optional)
$identifier string The identifier of the node, unique within the workspace, optional(!)
Résultat Node

createVariantForContext() public méthode

Given a context a new node is returned that is like this node, but lives in the new context.
public createVariantForContext ( Context $context ) : Neos\ContentRepository\Domain\Model\NodeInterface
$context Neos\ContentRepository\Domain\Service\Context
Résultat Neos\ContentRepository\Domain\Model\NodeInterface

dimensionsAreMatchingTargetDimensionValues() public méthode

The dimension value of this node has to match the current target dimension value (must be higher in priority or equal)

emitAfterNodeCopy() protected méthode

protected emitAfterNodeCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $copiedNode, Neos\ContentRepository\Domain\Model\NodeInterface $targetParentNode ) : void
$copiedNode Neos\ContentRepository\Domain\Model\NodeInterface
$targetParentNode Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

emitAfterNodeCreate() protected méthode

Signals that a node was created.
protected emitAfterNodeCreate ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

emitAfterNodeMove() protected méthode

protected emitAfterNodeMove ( Neos\ContentRepository\Domain\Model\NodeInterface $movedNode, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, integer $movePosition ) : void
$movedNode Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$movePosition integer
Résultat void

emitBeforeNodeCopy() protected méthode

protected emitBeforeNodeCopy ( Neos\ContentRepository\Domain\Model\NodeInterface $sourceNode, Neos\ContentRepository\Domain\Model\NodeInterface $targetParentNode ) : void
$sourceNode Neos\ContentRepository\Domain\Model\NodeInterface
$targetParentNode Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

emitBeforeNodeCreate() protected méthode

Signals that a node will be created.
protected emitBeforeNodeCreate ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $name, string $nodeType, string $identifier ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$name string
$nodeType string
$identifier string
Résultat void

emitBeforeNodeMove() protected méthode

protected emitBeforeNodeMove ( Neos\ContentRepository\Domain\Model\NodeInterface $movedNode, Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, integer $movePosition ) : void
$movedNode Neos\ContentRepository\Domain\Model\NodeInterface
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$movePosition integer
Résultat void

emitBeforeNodePropertyChange() protected méthode

Signals that the property of a node will be changed.
protected emitBeforeNodePropertyChange ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $newValue ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$propertyName string name of the property that has been changed/added
$oldValue mixed the property value before it was changed or NULL if the property is new
$newValue mixed the new property value
Résultat void

emitNodeAdded() protected méthode

Signals that a node was added.
protected emitNodeAdded ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

emitNodePathChanged() protected méthode

Signals that the node path has been changed.
protected emitNodePathChanged ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $oldPath, string $newPath, boolean $recursion )
$node Neos\ContentRepository\Domain\Model\NodeInterface
$oldPath string
$newPath string
$recursion boolean TRUE if the node path change was caused because a parent node path was changed

emitNodePropertyChanged() protected méthode

Signals that the property of a node was changed.
protected emitNodePropertyChanged ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $propertyName, mixed $oldValue, mixed $newValue ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$propertyName string name of the property that has been changed/added
$oldValue mixed the property value before it was changed or NULL if the property is new
$newValue mixed the new property value
Résultat void

emitNodeRemoved() protected méthode

Signals that a node was removed.
protected emitNodeRemoved ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

emitNodeUpdated() protected méthode

Signals that a node was updated.
protected emitNodeUpdated ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

getAccessRoles() public méthode

Returns the names of defined access roles
public getAccessRoles ( ) : array
Résultat array

getCacheEntryIdentifier() public méthode

Returns a string which distinctly identifies this object and thus can be used as an identifier for cache entries related to this object.
public getCacheEntryIdentifier ( ) : string
Résultat string

getChildNodes() public méthode

If a node type is specified, only nodes of that type are returned.
public getChildNodes ( string $nodeTypeFilter = null, integer $limit = null, integer $offset = null ) : array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$nodeTypeFilter string If specified, only nodes with that node type are considered
$limit integer An optional limit for the number of nodes to find. Added or removed nodes can still change the number nodes!
$offset integer An optional offset for the query
Résultat array<\Neos\ContentRepository\Domain\Model\NodeInterface>

getContentObject() public méthode

Returns the content object of this node (if any).
public getContentObject ( ) : object
Résultat object

getContext() public méthode

Returns the context this node operates in.
public getContext ( ) : Context
Résultat Neos\ContentRepository\Domain\Service\Context

getContextPath() public méthode

Example: /sites/mysitecom/homepage/about@user-admin
public getContextPath ( ) : string
Résultat string Node path with context information

getCreationDateTime() public méthode

public getCreationDateTime ( ) : DateTimeInterface
Résultat DateTimeInterface

getDepth() public méthode

Counting starts with 0 for "/", 1 for "/foo", 2 for "/foo/bar" etc.
public getDepth ( ) : integer
Résultat integer

getDimensions() public méthode

Return the assigned content dimensions of the node.
public getDimensions ( ) : array
Résultat array

getFullLabel() public méthode

Returns a full length plain text description of this node
Deprecation: since 1.2
public getFullLabel ( ) : string
Résultat string

getHiddenAfterDateTime() public méthode

Returns the date and time after which this node will be automatically hidden.
public getHiddenAfterDateTime ( ) : DateTime
Résultat DateTime Date after which this node will be hidden

getHiddenBeforeDateTime() public méthode

Returns the date and time before which this node will be automatically hidden.
public getHiddenBeforeDateTime ( ) : DateTime
Résultat DateTime Date before this node will be hidden

getIdentifier() public méthode

Returns the identifier of this node
public getIdentifier ( ) : string
Résultat string the node's UUID (unique within the workspace)

getIndex() public méthode

Returns the index of this node which determines the order among siblings with the same parent node.
public getIndex ( ) : integer
Résultat integer

getLabel() public méthode

Returns the node label as generated by the configured node label generator
public getLabel ( ) : string
Résultat string

getLastModificationDateTime() public méthode

public getLastModificationDateTime ( ) : DateTimeInterface
Résultat DateTimeInterface

getLastPublicationDateTime() public méthode

public getLastPublicationDateTime ( ) : DateTime
Résultat DateTime

getName() public méthode

Returns the name of this node
public getName ( ) : string
Résultat string

getNode() public méthode

Returns a node specified by the given relative path.
public getNode ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface
$path string Path specifying the node, relative to this node
Résultat Neos\ContentRepository\Domain\Model\NodeInterface The specified node or NULL if no such node exists

getNodeData() public méthode

public getNodeData ( ) : NodeData
Résultat NodeData

getNodeType() public méthode

Returns the node type of this node.
public getNodeType ( ) : NodeType
Résultat NodeType

getNumberOfChildNodes() public méthode

Returns the number of child nodes a similar getChildNodes() call would return.
public getNumberOfChildNodes ( string $nodeTypeFilter = null ) : integer
$nodeTypeFilter string If specified, only nodes with that node type are considered
Résultat integer The number of child nodes

getOtherNodeVariants() public méthode

getParent() public méthode

Returns the parent node of this node
public getParent ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
Résultat Neos\ContentRepository\Domain\Model\NodeInterface The parent node or NULL if this is the root node

getParentPath() public méthode

Returns the parent node path
public getParentPath ( ) : string
Résultat string Absolute node path of the parent node

getPath() public méthode

Returns the path of this node
public getPath ( ) : string
Résultat string

getPrimaryChildNode() public méthode

Which node acts as a primary child node will in the future depend on the node type. For now it is just the first child node.
public getPrimaryChildNode ( ) : Node
Résultat Node The primary child node or NULL if no such node exists

getProperties() public méthode

If the node has a content object attached, the properties will be fetched there.
public getProperties ( boolean $returnNodesAsIdentifiers = false ) : array
$returnNodesAsIdentifiers boolean If enabled, references to nodes are returned as node identifiers instead of NodeData objects
Résultat array Property values, indexed by their name

getProperty() public méthode

If the node has a content object attached, the property will be fetched there if it is gettable.
public getProperty ( string $propertyName, boolean $returnNodesAsIdentifiers = false ) : mixed
$propertyName string Name of the property
$returnNodesAsIdentifiers boolean If enabled, references to nodes are returned as node identifiers instead of NodeInterface instances
Résultat mixed value of the property

getPropertyNames() public méthode

Returns the names of all properties of this node.
public getPropertyNames ( ) : array
Résultat array Property names

getWorkspace() public méthode

Returns the workspace this node is contained in
public getWorkspace ( ) : Workspace
Résultat Workspace

hasAccessRestrictions() public méthode

Tells if a node, in general, has access restrictions, independent of the current security context.
public hasAccessRestrictions ( ) : boolean
Résultat boolean

hasChildNodes() public méthode

Checks if this node has any child nodes.
public hasChildNodes ( string $nodeTypeFilter = null ) : boolean
$nodeTypeFilter string If specified, only nodes with that node type are considered
Résultat boolean TRUE if this node has child nodes, otherwise FALSE

hasProperty() public méthode

If the node has a content object attached, the property will be checked there.
public hasProperty ( string $propertyName ) : boolean
$propertyName string
Résultat boolean

isAccessible() public méthode

Tells if this node may be accessed according to the current security context.
public isAccessible ( ) : boolean
Résultat boolean

isAutoCreated() public méthode

Determine if this node is configured as auto-created childNode of the parent node. If that is the case, it should not be deleted.
public isAutoCreated ( ) : boolean
Résultat boolean TRUE if this node is auto-created by the parent.

isHidden() public méthode

Returns the current state of the hidden flag
public isHidden ( ) : boolean
Résultat boolean

isHiddenInIndex() public méthode

If this node should be hidden in indexes
public isHiddenInIndex ( ) : boolean
Résultat boolean

isNodeDataMatchingContext() protected méthode

Needs to be adjusted for further context dimensions.
protected isNodeDataMatchingContext ( ) : boolean
Résultat boolean

isNodePathAvailable() protected méthode

Checks if the given node path is available for this node, so either no node with this path exists or an existing node has the same identifier.
protected isNodePathAvailable ( string $path ) : boolean
$path string
Résultat boolean

isNodeTypeAllowedAsChildNode() public méthode

Checks if the given $nodeType would be allowed as a child node of this node according to the configured constraints.
public isNodeTypeAllowedAsChildNode ( NodeType $nodeType ) : boolean
$nodeType NodeType
Résultat boolean TRUE if the passed $nodeType is allowed as child node

isRemoved() public méthode

If this node is a removed node.
public isRemoved ( ) : boolean
Résultat boolean

isVisible() public méthode

For this the "hidden" flag and the "hiddenBeforeDateTime" and "hiddenAfterDateTime" dates are taken into account.
public isVisible ( ) : boolean
Résultat boolean

materializeNodeData() protected méthode

Materializes the original node data (of a different workspace) into the current workspace.
protected materializeNodeData ( ) : void
Résultat void

moveAfter() public méthode

Moves this node after the given node
public moveAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null )
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$newName string

moveBefore() public méthode

Moves this node before the given node
public moveBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null )
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$newName string

moveInto() public méthode

Moves this node into the given node
public moveInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode, string $newName = null )
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
$newName string

moveNodeData() protected méthode

Moves a NodeData object that is either a variant or child node to the given destination path.
protected moveNodeData ( NodeData $nodeData, string $originalPath, string $destinationPath, boolean $recursiveCall ) : array | null
$nodeData NodeData
$originalPath string
$destinationPath string
$recursiveCall boolean
Résultat array | null

moveNodeToDestinationPath() protected méthode

Moves the given node to the destination path by modifying the underlaying NodeData object.
protected moveNodeToDestinationPath ( Neos\ContentRepository\Domain\Model\NodeInterface $node, string $destinationPath ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
$destinationPath string
Résultat void

moveVariantOrChild() protected méthode

Moves the given variant or child node to the destination defined by the given path which is the new path for the originally moved (parent|variant) node
protected moveVariantOrChild ( string $aggregateOriginalPath, string $aggregateDestinationPath, Neos\ContentRepository\Domain\Model\NodeInterface $nodeToMove = null ) : array
$aggregateOriginalPath string
$aggregateDestinationPath string
$nodeToMove Neos\ContentRepository\Domain\Model\NodeInterface
Résultat array NodeVariant and old and new path

remove() public méthode

Removes this node and all its child nodes. This is an alias for setRemoved(TRUE)
public remove ( ) : void
Résultat void

removeProperty() public méthode

If the node has a content object attached, the property will not be removed on that object if it exists.
public removeProperty ( string $propertyName ) : void
$propertyName string Name of the property
Résultat void

resolvePropertyReferences() protected méthode

Maps the property value (an array of node identifiers) to the Node objects if needed.
protected resolvePropertyReferences ( array $value = [] ) : array
$value array
Résultat array

setAccessRoles() public méthode

Sets the roles which are required to access this node
public setAccessRoles ( array $accessRoles ) : void
$accessRoles array
Résultat void

setContentObject() public méthode

Sets a content object for this node.
public setContentObject ( object $contentObject ) : void
$contentObject object The content object
Résultat void

setHidden() public méthode

Sets the "hidden" flag for this node.
public setHidden ( boolean $hidden ) : void
$hidden boolean If TRUE, this Node will be hidden
Résultat void

setHiddenAfterDateTime() public méthode

Sets the date and time when this node should be automatically hidden
public setHiddenAfterDateTime ( DateTime $dateTime = null ) : void
$dateTime DateTime Date after which this node should be hidden
Résultat void

setHiddenBeforeDateTime() public méthode

Sets the date and time when this node becomes potentially visible.
public setHiddenBeforeDateTime ( DateTime $dateTime = null ) : void
$dateTime DateTime Date before this node should be hidden
Résultat void

setHiddenInIndex() public méthode

Sets if this node should be hidden in indexes, such as a site navigation.
public setHiddenInIndex ( boolean $hidden ) : void
$hidden boolean TRUE if it should be hidden, otherwise FALSE
Résultat void

setIndex() public méthode

NOTE: This method is meant for internal use and must only be used by other nodes.
public setIndex ( integer $index ) : void
$index integer The new index
Résultat void

setLastPublicationDateTime() public méthode

public setLastPublicationDateTime ( DateTimeInterface $lastModificationDateTime ) : void
$lastModificationDateTime DateTimeInterface
Résultat void

setName() public méthode

Set the name of the node to $newName, keeping its position as it is.
public setName ( string $newName ) : void
$newName string
Résultat void

setNodeData() public méthode

NOTE: This is internal only and should not be used outside of the ContentRepository. TODO: As it is used in the Workspace this should become part of the interface in the next major release.
public setNodeData ( NodeData $nodeData ) : void
$nodeData NodeData
Résultat void

setNodeDataIsMatchingContext() public méthode

NOTE: This is internal only and should not be used outside of the ContentRepository.
public setNodeDataIsMatchingContext ( boolean $status ) : void
$status boolean
Résultat void

setNodeType() public méthode

Sets the node type of this node.
public setNodeType ( NodeType $nodeType ) : void
$nodeType NodeType
Résultat void

setPath() protected méthode

This method is only for internal use by the content repository or node methods. Changing the path of a node manually may lead to unexpected behavior. To achieve a correct behavior when changing the path (moving the node) in a workspace, a shadow node data that will hide the node data in the base workspace will be created. Thus queries do not need to worry about moved nodes. Through a movedTo reference the shadow node data will be removed when publishing the moved node.
protected setPath ( string $path, boolean $checkForExistence = true ) : void
$path string
$checkForExistence boolean Checks for existence at target path, internally used for recursions and shadow nodes.
Résultat void

setPathInternal() protected méthode

This process is different depending on the fact if the node is an aggregate type or not.
protected setPathInternal ( string $destinationPath, boolean $recursiveCall ) : array
$destinationPath string the new node path
$recursiveCall boolean is this a recursive call
Résultat array NodeVariants and old and new paths

setPathInternalForAggregate() protected méthode

Moves a node and sub nodes to the new path given with special logic for aggregate node types.
protected setPathInternalForAggregate ( string $destinationPath, boolean $recursiveCall ) : array
$destinationPath string the new node path
$recursiveCall boolean is this a recursive call
Résultat array of arrays with NodeVariant and old and new path and if this was a recursive call

setProperty() public méthode

If the node has a content object attached, the property will be set there if it is settable.
public setProperty ( string $propertyName, mixed $value ) : mixed
$propertyName string Name of the property
$value mixed Value of the property
Résultat mixed

setRemoved() public méthode

Enables using the remove method when only setters are available
public setRemoved ( boolean $removed ) : void
$removed boolean If TRUE, this node and it's child nodes will be removed. If it is FALSE only this node will be restored.
Résultat void

setWorkspace() public méthode

This method is only for internal use by the content repository. Changing the workspace of a node manually may lead to unexpected behavior.
public setWorkspace ( Workspace $workspace ) : void
$workspace Workspace
Résultat void

similarize() public méthode

For internal use in createRecursiveCopy.
public similarize ( Neos\ContentRepository\Domain\Model\NodeInterface $sourceNode, boolean $isCopy = false ) : void
$sourceNode Neos\ContentRepository\Domain\Model\NodeInterface
$isCopy boolean
Résultat void

unsetContentObject() public méthode

Unsets the content object of this node.
public unsetContentObject ( ) : void
Résultat void

willChildNodeBeAutoCreated() protected méthode

Checks if the given Node $name is configured as auto-created childNode in the NodeType configuration.
protected willChildNodeBeAutoCreated ( string $name ) : boolean
$name string The node name to check.
Résultat boolean TRUE if the given nodeName is configured as auto-created child node.

Property Details

$context protected_oe property

protected Context,Neos\ContentRepository\Domain\Service $context
Résultat Neos\ContentRepository\Domain\Service\Context

$contextFactory protected_oe property

protected ContextFactoryInterface,Neos\ContentRepository\Domain\Service $contextFactory
Résultat Neos\ContentRepository\Domain\Service\ContextFactoryInterface

$nodeData protected_oe property

The NodeData entity this version is for.
protected NodeData,Neos\ContentRepository\Domain\Model $nodeData
Résultat NodeData

$nodeDataIsMatchingContext protected_oe property

Defines if the NodeData represented by this Node is already in the same context or if it is currently just "shining through".
protected bool $nodeDataIsMatchingContext
Résultat boolean

$nodeDataRepository protected_oe property

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Résultat Neos\ContentRepository\Domain\Repository\NodeDataRepository

$nodeFactory protected_oe property

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Résultat Neos\ContentRepository\Domain\Factory\NodeFactory

$nodeService protected_oe property

protected NodeServiceInterface,Neos\ContentRepository\Domain\Service $nodeService
Résultat Neos\ContentRepository\Domain\Service\NodeServiceInterface

$propertyMapper protected_oe property

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Résultat Neos\Flow\Property\PropertyMapper