PHP Интерфейс Neos\ContentRepository\Domain\Model\NodeInterface

Показать файл Открыть проект Примеры использования интерфейса

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Returns a full length plain text label 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() публичный Метод

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
Результат string the node's UUID

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

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

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

Returns a full length plain text label of this node
public getLabel ( ) : string
Результат string

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

Return the NodeData representation of the node.
public getNodeData ( ) : NodeData
Результат NodeData

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

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

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

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

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

Example: /sites/mysitecom/homepage/about
public getPath ( ) : string
Результат string The absolute node path

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 ( ) : Neos\ContentRepository\Domain\Model\NodeInterface
Результат Neos\ContentRepository\Domain\Model\NodeInterface 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 ( ) : array
Результат 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 ) : mixed
$propertyName string Name of the property
Результат 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 Name of the property to test for
Результат 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

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

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

Moves this node after the given node
public moveAfter ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

Moves this node before the given node
public moveBefore ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

Moves this node into the given node
public moveInto ( Neos\ContentRepository\Domain\Model\NodeInterface $referenceNode ) : void
$referenceNode Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

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

This method is for internal use and must only be used by other nodes!
public setIndex ( integer $index ) : void
$index integer The new index
Результат void

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

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

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

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

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 ) : void
$propertyName string Name of the property
$value mixed Value of the property
Результат void

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

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

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

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