TraversableNodeInterface
interface TraversableNodeInterface implements NodeInterface (View source)
This is a NEW interface, introduced in Neos 4.3; and it will become the main interface with Neos 5.0 to the CR.
The main convenience Event-Sourced NodeInterface used for READING; containing data accessors and traversal methods.
All methods which are called get*()
contain only information local to a node,
so they can be accessed really quickly without any external lookup.
All methods which are called find*()
may involve some database querying to
fetch their information.
The TraversableNodeInterface is immutable, meaning its contents never change after creation. It is only used for reading.
Starting with version 5.0 (when backed by the Event Sourced CR), it is completely detached from storage; so it will not auto-update after a property changed in storage.
Methods
Whether or not this node is the root of the graph, i.e. has no parent node
Whether or not this node is tethered to its parent, fka auto created child node
returns the DimensionSpacePoint the node is at home in. Usually needed to address a Node in a NodeAggregate in order to update it.
Returns all properties of this node. References are NOT part of this API; there you need to check getReference() and getReferences()
If this node has a property with the given name. Does NOT check the NodeType; but checks for a non-NULL property value.
Returns the node label as generated by the configured node label generator
Returns the DimensionSpacePoint the node was requested in, i.e. one of the DimensionSpacePoints this node is visible in. If you need the DimensionSpacePoint where the node is actually at home, see getOriginDimensionSpacePoint()
Retrieves and returns the parent node from the node's subgraph.
Retrieves and returns the node's path to its root node.
Retrieves and returns a child node by name from the node's subgraph.
Retrieves and returns all direct child nodes of this node from its subgraph.
Returns the number of direct child nodes of this node from its subgraph.
Retrieves and returns all nodes referenced by this node from its subgraph.
Retrieves and returns nodes referenced by this node by name from its subgraph.
Retrieves and returns nodes referencing this node from its subgraph.
Retrieves and returns nodes referencing this node by name from its subgraph.
Details
bool
isRoot()
Whether or not this node is the root of the graph, i.e. has no parent node
bool
isTethered()
Whether or not this node is tethered to its parent, fka auto created child node
ContentStreamIdentifier
getContentStreamIdentifier()
No description
NodeAggregateIdentifier
getNodeAggregateIdentifier()
No description
NodeTypeName
getNodeTypeName()
No description
NodeType
getNodeType()
No description
NodeName|null
getNodeName()
No description
OriginDimensionSpacePoint
getOriginDimensionSpacePoint()
returns the DimensionSpacePoint the node is at home in. Usually needed to address a Node in a NodeAggregate in order to update it.
PropertyCollectionInterface
getProperties()
Returns all properties of this node. References are NOT part of this API; there you need to check getReference() and getReferences()
mixed
getProperty(string $propertyName)
Returns the specified property.
If the node has a content object attached, the property will be fetched there if it is gettable.
bool
hasProperty(string $propertyName)
If this node has a property with the given name. Does NOT check the NodeType; but checks for a non-NULL property value.
string
getLabel()
Returns the node label as generated by the configured node label generator
DimensionSpacePoint
getDimensionSpacePoint()
Returns the DimensionSpacePoint the node was requested in, i.e. one of the DimensionSpacePoints this node is visible in. If you need the DimensionSpacePoint where the node is actually at home, see getOriginDimensionSpacePoint()
TraversableNodeInterface
findParentNode()
Retrieves and returns the parent node from the node's subgraph.
If no parent node is present, an NodeException is thrown.
NodePath
findNodePath()
Retrieves and returns the node's path to its root node.
TraversableNodeInterface
findNamedChildNode(NodeName $nodeName)
Retrieves and returns a child node by name from the node's subgraph.
TraversableNodes
findChildNodes(NodeTypeConstraints $nodeTypeConstraints = null, int $limit = null, int $offset = null)
Retrieves and returns all direct child nodes of this node from its subgraph.
If node type constraints are specified, only nodes of that type are returned.
int
countChildNodes(NodeTypeConstraints $nodeTypeConstraints = null)
Returns the number of direct child nodes of this node from its subgraph.
TraversableNodes
findReferencedNodes()
Retrieves and returns all nodes referenced by this node from its subgraph.
TraversableNodes
findNamedReferencedNodes(PropertyName $edgeName)
Retrieves and returns nodes referenced by this node by name from its subgraph.
TraversableNodes
findReferencingNodes()
Retrieves and returns nodes referencing this node from its subgraph.
TraversableNodes
findNamedReferencingNodes(PropertyName $nodeName)
Retrieves and returns nodes referencing this node by name from its subgraph.
bool
equals(TraversableNodeInterface $other)
Compare whether two traversable nodes are equal