AbsoluteNodePath
final class AbsoluteNodePath implements JsonSerializable (View source)
An absolute node path, composed of the root node's type and a relative path from there.
Example:
root path: '/
It describes the hierarchy path of a node to and including its root node in a subgraph.
To fetch a node via an absolute path use the subgraph: {[\Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface::findNodeByAbsolutePath()}
$subgraph->findNodeByAbsolutePath(
](../../../../../Neos/ContentRepository/Core/Projection/ContentGraph/ContentSubgraphInterface.html) AbsoluteNodePath::fromString("/<Neos.Neos:Sites>/my-site/main")
) Methods
The ancestors must be ordered with the root node first.
No description
No description
No description
While all absolute node paths have a root node type name, they are root only if they point to exactly that root node and not one of its descendants
No description
No description
No description
No description
No description
Details
static AbsoluteNodePath
fromRootNodeTypeNameAndRelativePath(NodeTypeName $rootNodeTypeName, NodePath $path)
No description
static AbsoluteNodePath
fromLeafNodeAndAncestors(Node $leafNode, Nodes $ancestors)
The ancestors must be ordered with the root node first.
If you want to retrieve the path of a node using {\Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface::findAncestorNodes()}, you need to reverse the order first {[\Neos\ContentRepository\Core\Projection\ContentGraph\Nodes::reverse()}
$ancestors](../../../../../Neos/ContentRepository/Core/Projection/ContentGraph/Nodes.html) = $this->findAncestorNodes($leafNode->nodeAggregateId, FindAncestorNodesFilter::create())->reverse();
$absoluteNodePath = AbsoluteNodePath::fromLeafNodeAndAncestors($leafNode, $ancestors);
static bool
patternIsMatchedByString(string $value)
No description
static AbsoluteNodePath
fromString(string $value)
No description
static AbsoluteNodePath|null
tryFromString(string $string)
No description
AbsoluteNodePath
appendPathSegment(NodeName $nodeName)
No description
bool
isRoot()
While all absolute node paths have a root node type name, they are root only if they point to exactly that root node and not one of its descendants
array
getParts()
No description
int
getDepth()
No description
bool
equals(AbsoluteNodePath $other)
No description
string
serializeToString()
No description
string
jsonSerialize()
No description
string
__toString()
No description