PHP Interface Neos\ContentRepository\Domain\Model\NodeInterface

Afficher le fichier Open project: neos/neos-development-collection Interface Usage Examples

Méthodes publiques

Méthode Description
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 to below the given node. The new node will be added behind any existing sub nodes of the given node.
createNode ( string $name, NodeType $nodeType = null, string $identifier = null ) : Node 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.
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.
getAccessRoles ( ) : array Returns the names of defined access roles
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 Return the context of the node
getContextPath ( ) : string Returns the absolute path of this node with additional context information (such as the workspace name).
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 label 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 a full length plain text label of this node
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 Return the NodeData representation of the node.
getNodeType ( ) : NodeType Returns the node type of this node.
getOtherNodeVariants ( ) : array Get other variants of this node (with different dimension values)
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 ( ) : Neos\ContentRepository\Domain\Model\NodeInterface Returns the primary child node of this node.
getProperties ( ) : array Returns all properties of this node.
getProperty ( string $propertyName ) : 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 ) : void Moves this node after the given node
moveBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void Moves this node before the given node
moveInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void 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
setName ( string $newName ) : void Set the name of the node to $newName, keeping it's position as it is
setNodeType ( NodeType $nodeType ) : void Sets the node type of this node.
setProperty ( string $propertyName, mixed $value ) : void Sets the specified property.
setRemoved ( boolean $removed ) : void Removes this node and all its child nodes or sets ONLY this node to not being removed.
setWorkspace ( Workspace $workspace ) : void Sets the workspace of this node.
unsetContentObject ( ) : void Unsets the content object of this node.

Method Details

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 to below the given node. The new node will be added behind any existing sub nodes of 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

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 ) : 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

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

createSingleNode() public méthode

For internal use only!
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

getAccessRoles() public méthode

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

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 The content object or NULL if none was set

getContext() public méthode

Return the context of the node
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

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 An array of dimensions to array of dimension values

getFullLabel() public méthode

Returns a full length plain text label 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

This UUID is not the same as the technical persistence identifier used by Flow's persistence framework. It is an additional identifier which is unique within the same workspace and is used for tracking the same node in across workspaces. It is okay and recommended to use this identifier for synchronisation purposes as it does not change even if all of the nodes content or its path changes.
public getIdentifier ( ) : string
Résultat string the node's UUID

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 a full length plain text label of this node
public getLabel ( ) : string
Résultat string

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

Return the NodeData representation of the node.
public getNodeData ( ) : NodeData
Résultat NodeData

getNodeType() public méthode

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

getOtherNodeVariants() public méthode

A variant of a node can have different dimension values and path (for non-aggregate nodes). The resulting node instances might belong to a different context.
public getOtherNodeVariants ( ) : array
Résultat array

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

Example: /sites/mysitecom/homepage/about
public getPath ( ) : string
Résultat string The absolute node path

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 ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
Résultat Neos\ContentRepository\Domain\Model\NodeInterface 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 ( ) : array
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 ) : mixed
$propertyName string Name of the property
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 Name of the property to test for
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

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

moveAfter() public méthode

Moves this node after the given node
public moveAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

moveBefore() public méthode

Moves this node before the given node
public moveBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

moveInto() public méthode

Moves this node into the given node
public moveInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Résultat void

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

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

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

setName() public méthode

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

setNodeType() public méthode

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

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 ) : void
$propertyName string Name of the property
$value mixed Value of the property
Résultat void

setRemoved() public méthode

Removes this node and all its child nodes or sets ONLY this node to not being removed.
public setRemoved ( boolean $removed ) : void
$removed boolean If TRUE, this node and it's child nodes will be removed or set to be not removed.
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

unsetContentObject() public méthode

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