PHP Класс Neos\ContentRepository\Domain\Model\Node

Наследование: implements Neos\ContentRepository\Domain\Model\NodeInterface, implements Neos\Cache\CacheAwareInterface
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

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

__construct() публичный Метод

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

__toString() публичный Метод

For debugging purposes, the node can be converted to a string.
public __toString ( ) : string
Результат string

copyAfter() публичный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

copyBefore() публичный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

copyInto() публичный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

copyIntoInternal() защищенный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

createNode() публичный Метод

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(!)
Результат Neos\ContentRepository\Domain\Model\NodeInterface

createNodeForVariant() защищенный Метод

Create a node for the given NodeData, given that it is a variant of the current node
protected createNodeForVariant ( NodeData $nodeData ) : Node
$nodeData NodeData
Результат Node

createNodeFromTemplate() публичный Метод

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.
Результат Neos\ContentRepository\Domain\Model\NodeInterface the freshly generated node

createRecursiveCopy() защищенный Метод

$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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

createSingleNode() публичный Метод

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(!)
Результат Node

createVariantForContext() публичный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface

dimensionsAreMatchingTargetDimensionValues() публичный Метод

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

emitAfterNodeCopy() защищенный Метод

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

emitAfterNodeCreate() защищенный Метод

Signals that a node was created.
protected emitAfterNodeCreate ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

emitAfterNodeMove() защищенный Метод

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

emitBeforeNodeCopy() защищенный Метод

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

emitBeforeNodeCreate() защищенный Метод

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

emitBeforeNodeMove() защищенный Метод

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

emitBeforeNodePropertyChange() защищенный Метод

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

emitNodeAdded() защищенный Метод

Signals that a node was added.
protected emitNodeAdded ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

emitNodePathChanged() защищенный Метод

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() защищенный Метод

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

emitNodeRemoved() защищенный Метод

Signals that a node was removed.
protected emitNodeRemoved ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

emitNodeUpdated() защищенный Метод

Signals that a node was updated.
protected emitNodeUpdated ( Neos\ContentRepository\Domain\Model\NodeInterface $node ) : void
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

getAccessRoles() публичный Метод

Returns the names of defined access roles
public getAccessRoles ( ) : array
Результат array

getCacheEntryIdentifier() публичный Метод

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

getChildNodes() публичный Метод

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
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>

getContentObject() публичный Метод

Returns the content object of this node (if any).
public getContentObject ( ) : object
Результат object

getContext() публичный Метод

Returns the context this node operates in.
public getContext ( ) : Context
Результат Neos\ContentRepository\Domain\Service\Context

getContextPath() публичный Метод

Example: /sites/mysitecom/homepage/about@user-admin
public getContextPath ( ) : string
Результат string Node path with context information

getCreationDateTime() публичный Метод

public getCreationDateTime ( ) : DateTimeInterface
Результат DateTimeInterface

getDepth() публичный Метод

Counting starts with 0 for "/", 1 for "/foo", 2 for "/foo/bar" etc.
public getDepth ( ) : integer
Результат integer

getDimensions() публичный Метод

Return the assigned content dimensions of the node.
public getDimensions ( ) : array
Результат array

getFullLabel() публичный Метод

Returns a full length plain text description of this node
Устаревший: since 1.2
public getFullLabel ( ) : string
Результат string

getHiddenAfterDateTime() публичный Метод

Returns the date and time after which this node will be automatically hidden.
public getHiddenAfterDateTime ( ) : DateTime
Результат DateTime Date after which this node will be hidden

getHiddenBeforeDateTime() публичный Метод

Returns the date and time before which this node will be automatically hidden.
public getHiddenBeforeDateTime ( ) : DateTime
Результат DateTime Date before this node will be hidden

getIdentifier() публичный Метод

Returns the identifier of this node
public getIdentifier ( ) : string
Результат string the node's UUID (unique within the workspace)

getIndex() публичный Метод

Returns the index of this node which determines the order among siblings with the same parent node.
public getIndex ( ) : integer
Результат integer

getLabel() публичный Метод

Returns the node label as generated by the configured node label generator
public getLabel ( ) : string
Результат string

getLastModificationDateTime() публичный Метод

public getLastModificationDateTime ( ) : DateTimeInterface
Результат DateTimeInterface

getLastPublicationDateTime() публичный Метод

public getLastPublicationDateTime ( ) : DateTime
Результат DateTime

getName() публичный Метод

Returns the name of this node
public getName ( ) : string
Результат string

getNode() публичный Метод

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
Результат Neos\ContentRepository\Domain\Model\NodeInterface The specified node or NULL if no such node exists

getNodeData() публичный Метод

public getNodeData ( ) : NodeData
Результат NodeData

getNodeType() публичный Метод

Returns the node type of this node.
public getNodeType ( ) : NodeType
Результат NodeType

getNumberOfChildNodes() публичный Метод

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
Результат integer The number of child nodes

getOtherNodeVariants() публичный Метод

getParent() публичный Метод

Returns the parent node of this node
public getParent ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
Результат Neos\ContentRepository\Domain\Model\NodeInterface The parent node or NULL if this is the root node

getParentPath() публичный Метод

Returns the parent node path
public getParentPath ( ) : string
Результат string Absolute node path of the parent node

getPath() публичный Метод

Returns the path of this node
public getPath ( ) : string
Результат string

getPrimaryChildNode() публичный Метод

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
Результат Node The primary child node or NULL if no such node exists

getProperties() публичный Метод

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
Результат array Property values, indexed by their name

getProperty() публичный Метод

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
Результат mixed value of the property

getPropertyNames() публичный Метод

Returns the names of all properties of this node.
public getPropertyNames ( ) : array
Результат array Property names

getWorkspace() публичный Метод

Returns the workspace this node is contained in
public getWorkspace ( ) : Workspace
Результат Workspace

hasAccessRestrictions() публичный Метод

Tells if a node, in general, has access restrictions, independent of the current security context.
public hasAccessRestrictions ( ) : boolean
Результат boolean

hasChildNodes() публичный Метод

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
Результат boolean TRUE if this node has child nodes, otherwise FALSE

hasProperty() публичный Метод

If the node has a content object attached, the property will be checked there.
public hasProperty ( string $propertyName ) : boolean
$propertyName string
Результат boolean

isAccessible() публичный Метод

Tells if this node may be accessed according to the current security context.
public isAccessible ( ) : boolean
Результат boolean

isAutoCreated() публичный Метод

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
Результат boolean TRUE if this node is auto-created by the parent.

isHidden() публичный Метод

Returns the current state of the hidden flag
public isHidden ( ) : boolean
Результат boolean

isHiddenInIndex() публичный Метод

If this node should be hidden in indexes
public isHiddenInIndex ( ) : boolean
Результат boolean

isNodeDataMatchingContext() защищенный Метод

Needs to be adjusted for further context dimensions.
protected isNodeDataMatchingContext ( ) : boolean
Результат boolean

isNodePathAvailable() защищенный Метод

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

isNodeTypeAllowedAsChildNode() публичный Метод

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
Результат boolean TRUE if the passed $nodeType is allowed as child node

isRemoved() публичный Метод

If this node is a removed node.
public isRemoved ( ) : boolean
Результат boolean

isVisible() публичный Метод

For this the "hidden" flag and the "hiddenBeforeDateTime" and "hiddenAfterDateTime" dates are taken into account.
public isVisible ( ) : boolean
Результат boolean

materializeNodeData() защищенный Метод

Materializes the original node data (of a different workspace) into the current workspace.
protected materializeNodeData ( ) : void
Результат void

moveAfter() публичный Метод

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() публичный Метод

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() публичный Метод

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() защищенный Метод

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

moveNodeToDestinationPath() защищенный Метод

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

moveVariantOrChild() защищенный Метод

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
Результат array NodeVariant and old and new path

remove() публичный Метод

Removes this node and all its child nodes. This is an alias for setRemoved(TRUE)
public remove ( ) : void
Результат void

removeProperty() публичный Метод

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

resolvePropertyReferences() защищенный Метод

Maps the property value (an array of node identifiers) to the Node objects if needed.
protected resolvePropertyReferences ( array $value = [] ) : array
$value array
Результат array

setAccessRoles() публичный Метод

Sets the roles which are required to access this node
public setAccessRoles ( array $accessRoles ) : void
$accessRoles array
Результат void

setContentObject() публичный Метод

Sets a content object for this node.
public setContentObject ( object $contentObject ) : void
$contentObject object The content object
Результат void

setHidden() публичный Метод

Sets the "hidden" flag for this node.
public setHidden ( boolean $hidden ) : void
$hidden boolean If TRUE, this Node will be hidden
Результат void

setHiddenAfterDateTime() публичный Метод

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

setHiddenBeforeDateTime() публичный Метод

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

setHiddenInIndex() публичный Метод

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

setIndex() публичный Метод

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

setLastPublicationDateTime() публичный Метод

public setLastPublicationDateTime ( DateTimeInterface $lastModificationDateTime ) : void
$lastModificationDateTime DateTimeInterface
Результат void

setName() публичный Метод

Set the name of the node to $newName, keeping its position as it is.
public setName ( string $newName ) : void
$newName string
Результат void

setNodeData() публичный Метод

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

setNodeDataIsMatchingContext() публичный Метод

NOTE: This is internal only and should not be used outside of the ContentRepository.
public setNodeDataIsMatchingContext ( boolean $status ) : void
$status boolean
Результат void

setNodeType() публичный Метод

Sets the node type of this node.
public setNodeType ( NodeType $nodeType ) : void
$nodeType NodeType
Результат void

setPath() защищенный Метод

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

setPathInternal() защищенный Метод

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
Результат array NodeVariants and old and new paths

setPathInternalForAggregate() защищенный Метод

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
Результат array of arrays with NodeVariant and old and new path and if this was a recursive call

setProperty() публичный Метод

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

setRemoved() публичный Метод

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

setWorkspace() публичный Метод

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

similarize() публичный Метод

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

unsetContentObject() публичный Метод

Unsets the content object of this node.
public unsetContentObject ( ) : void
Результат void

willChildNodeBeAutoCreated() защищенный Метод

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.
Результат boolean TRUE if the given nodeName is configured as auto-created child node.

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

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

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

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

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

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

The NodeData entity this version is for.
protected NodeData,Neos\ContentRepository\Domain\Model $nodeData
Результат NodeData

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

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

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

protected NodeDataRepository,Neos\ContentRepository\Domain\Repository $nodeDataRepository
Результат Neos\ContentRepository\Domain\Repository\NodeDataRepository

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

protected NodeFactory,Neos\ContentRepository\Domain\Factory $nodeFactory
Результат Neos\ContentRepository\Domain\Factory\NodeFactory

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

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

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

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper