final class ContentSubgraphWithRuntimeCaches implements ContentSubgraphInterface (View source)

internal  implementation detail of {@see \Neos\ContentRepositoryRegistry\ContentRepositoryRegistry::subgraphForNode()}
 

Wrapper for a concrete implementation of the {ContentSubgraphInterface} that builds up an in memory cache while fetching nodes in order to speed up successive calls.

It is a rather pragmatic way to speed up (uncached) rendering.

Methods

decorate(ContentSubgraphInterface $uncachedSubgraph, SubgraphCachePool $subgraphCachePool)

No description

getWorkspaceName()

No description

findChildNodes(NodeAggregateId $parentNodeAggregateId, FindChildNodesFilter $filter)

Find direct child nodes of the specified parent node that match the given $filter

int
countChildNodes(NodeAggregateId $parentNodeAggregateId, CountChildNodesFilter $filter)

Count direct child nodes of the specified parent node that match the given $filter

findReferences(NodeAggregateId $nodeAggregateId, FindReferencesFilter $filter)

Find all "outgoing" references of a given node that match the specified $filter

int
countReferences(NodeAggregateId $nodeAggregateId, CountReferencesFilter $filter)

Count all "outgoing" references of a given node that match the specified $filter

findBackReferences(NodeAggregateId $nodeAggregateId, FindBackReferencesFilter $filter)

Find all "incoming" references of a given node that match the specified $filter If nodes "A" and "B" both have a reference to "C", the node "C" has two incoming references.

int
countBackReferences(NodeAggregateId $nodeAggregateId, CountBackReferencesFilter $filter)

Count all "incoming" references of a given node that match the specified $filter

Node|null
findNodeById(NodeAggregateId $nodeAggregateId)

Find a single node by its aggregate id

findNodesByIds(NodeAggregateIds $nodeAggregateIds)

Find all nodes by the specified aggregate ids

Node|null
findRootNodeByType(NodeTypeName $nodeTypeName)

Find a root node by its type Note that only one root node can exist per type as enforced by {RootNodeHandling}

Node|null
findParentNode(NodeAggregateId $childNodeAggregateId)

Find the direct parent of a node specified by its aggregate id

Node|null
findNodeByPath(NodePath|NodeName $path, NodeAggregateId $startingNodeAggregateId)

Find a single node underneath $startingNodeAggregateId that matches the specified $path

Node|null
findNodeByAbsolutePath(AbsoluteNodePath $path)

Find a single node underneath that matches the specified absolute $path

findSucceedingSiblingNodes(NodeAggregateId $siblingNodeAggregateId, FindSucceedingSiblingNodesFilter $filter)

Find all nodes that are positioned behind the specified sibling and match the specified $filter

findPrecedingSiblingNodes(NodeAggregateId $siblingNodeAggregateId, FindPrecedingSiblingNodesFilter $filter)

Find all nodes that are positioned before the specified sibling and match the specified $filter

retrieveNodePath(NodeAggregateId $nodeAggregateId)

Determine the absolute path of a node

Subtree|null
findSubtree(NodeAggregateId $entryNodeAggregateId, FindSubtreeFilter $filter)

Recursively find all nodes underneath the $entryNodeAggregateId that match the specified $filter and return them as a tree

findAncestorNodes(NodeAggregateId $entryNodeAggregateId, FindAncestorNodesFilter $filter)

Recursively find all nodes above the $entryNodeAggregateId that match the specified $filter and return them as a flat list

int
countAncestorNodes(NodeAggregateId $entryNodeAggregateId, CountAncestorNodesFilter $filter)

Count all nodes above the $entryNodeAggregateId that match the specified $filter

Node|null
findClosestNode(NodeAggregateId $entryNodeAggregateId, FindClosestNodeFilter $filter)

Find the closest matching node, the entry node itself or the first ancestors of the $entryNodeAggregateId, that match the specified $filter and return it Note: in contrast to {findAncestorNodes()} the resulting node will be the entry node if it matches the filter!

findDescendantNodes(NodeAggregateId $entryNodeAggregateId, FindDescendantNodesFilter $filter)

Recursively find all nodes underneath the $entryNodeAggregateId that match the specified $filter and return them as a flat list

int
countDescendantNodes(NodeAggregateId $entryNodeAggregateId, CountDescendantNodesFilter $filter)

Count all nodes underneath the $entryNodeAggregateId that match the specified $filter

int
countNodes()

Count all nodes in this subgraph, including inaccessible ones!

Details

static ContentSubgraphWithRuntimeCaches decorate(ContentSubgraphInterface $uncachedSubgraph, SubgraphCachePool $subgraphCachePool)

No description

Parameters

ContentSubgraphInterface $uncachedSubgraph
SubgraphCachePool $subgraphCachePool

Return Value

ContentSubgraphWithRuntimeCaches

ContentRepositoryId getContentRepositoryId()

No description

Return Value

ContentRepositoryId

WorkspaceName getWorkspaceName()

No description

Return Value

WorkspaceName

DimensionSpacePoint getDimensionSpacePoint()

No description

Return Value

DimensionSpacePoint

VisibilityConstraints getVisibilityConstraints()

No description

Return Value

VisibilityConstraints

Nodes findChildNodes(NodeAggregateId $parentNodeAggregateId, FindChildNodesFilter $filter)

Find direct child nodes of the specified parent node that match the given $filter

Parameters

NodeAggregateId $parentNodeAggregateId
FindChildNodesFilter $filter

Return Value

Nodes

int countChildNodes(NodeAggregateId $parentNodeAggregateId, CountChildNodesFilter $filter)

Count direct child nodes of the specified parent node that match the given $filter

Parameters

NodeAggregateId $parentNodeAggregateId
CountChildNodesFilter $filter

Return Value

int

References findReferences(NodeAggregateId $nodeAggregateId, FindReferencesFilter $filter)

Find all "outgoing" references of a given node that match the specified $filter

Because each reference has a name and can contain properties itself, this method does not return the target nodes directly, but a collection of references {\Neos\ContentRepository\Core\Projection\ContentGraph\References}. The corresponding nodes can be retrieved via {\Neos\ContentRepository\Core\Projection\ContentGraph\References::getNodes()}

Parameters

NodeAggregateId $nodeAggregateId
FindReferencesFilter $filter

Return Value

References

int countReferences(NodeAggregateId $nodeAggregateId, CountReferencesFilter $filter)

Count all "outgoing" references of a given node that match the specified $filter

Parameters

NodeAggregateId $nodeAggregateId
CountReferencesFilter $filter

Return Value

int

References findBackReferences(NodeAggregateId $nodeAggregateId, FindBackReferencesFilter $filter)

Find all "incoming" references of a given node that match the specified $filter If nodes "A" and "B" both have a reference to "C", the node "C" has two incoming references.

Parameters

NodeAggregateId $nodeAggregateId
FindBackReferencesFilter $filter

Return Value

References

int countBackReferences(NodeAggregateId $nodeAggregateId, CountBackReferencesFilter $filter)

Count all "incoming" references of a given node that match the specified $filter

Parameters

NodeAggregateId $nodeAggregateId
CountBackReferencesFilter $filter

Return Value

int

Node|null findNodeById(NodeAggregateId $nodeAggregateId)

Find a single node by its aggregate id

Parameters

NodeAggregateId $nodeAggregateId

Return Value

Node|null

the node or NULL if no node with the specified id is accessible in this subgraph

Nodes findNodesByIds(NodeAggregateIds $nodeAggregateIds)

Find all nodes by the specified aggregate ids

Parameters

NodeAggregateIds $nodeAggregateIds

Return Value

Nodes

the nodes that exist in this subgraph. The order is not defined.

Node|null findRootNodeByType(NodeTypeName $nodeTypeName)

Find a root node by its type Note that only one root node can exist per type as enforced by {RootNodeHandling}

Parameters

NodeTypeName $nodeTypeName

Return Value

Node|null

the node or null if no root node with the specified type is accessible in this subgraph

Node|null findParentNode(NodeAggregateId $childNodeAggregateId)

Find the direct parent of a node specified by its aggregate id

Parameters

NodeAggregateId $childNodeAggregateId

Return Value

Node|null

the node or NULL if the specified node is the root node or is inaccessible

Node|null findNodeByPath(NodePath|NodeName $path, NodeAggregateId $startingNodeAggregateId)

Find a single node underneath $startingNodeAggregateId that matches the specified $path

If a node name as $path is given it will be treated as path with a single segment.

NOTE: This operation is most likely to be deprecated since the concept of node paths is not really used in the core, and it has some logical issues

Parameters

NodePath|NodeName $path
NodeAggregateId $startingNodeAggregateId

Return Value

Node|null

the node that matches the given $path, or NULL if no node on that path is accessible

Node|null findNodeByAbsolutePath(AbsoluteNodePath $path)

Find a single node underneath that matches the specified absolute $path

NOTE: This operation is most likely to be deprecated since the concept of node paths is not really used in the core, and it has some logical issues

Parameters

AbsoluteNodePath $path

Return Value

Node|null

the node that matches the given $path, or NULL if no node on that path is accessible

Nodes findSucceedingSiblingNodes(NodeAggregateId $siblingNodeAggregateId, FindSucceedingSiblingNodesFilter $filter)

Find all nodes that are positioned behind the specified sibling and match the specified $filter

Parameters

NodeAggregateId $siblingNodeAggregateId
FindSucceedingSiblingNodesFilter $filter

Return Value

Nodes

Nodes findPrecedingSiblingNodes(NodeAggregateId $siblingNodeAggregateId, FindPrecedingSiblingNodesFilter $filter)

Find all nodes that are positioned before the specified sibling and match the specified $filter

Parameters

NodeAggregateId $siblingNodeAggregateId
FindPrecedingSiblingNodesFilter $filter

Return Value

Nodes

AbsoluteNodePath retrieveNodePath(NodeAggregateId $nodeAggregateId)

Determine the absolute path of a node

Parameters

NodeAggregateId $nodeAggregateId

Return Value

AbsoluteNodePath

Exceptions

InvalidArgumentException

Subtree|null findSubtree(NodeAggregateId $entryNodeAggregateId, FindSubtreeFilter $filter)

Recursively find all nodes underneath the $entryNodeAggregateId that match the specified $filter and return them as a tree

Note: This returns a fragment of the existing tree structure. The structure is kept intact but nodes might be missing depending on the specified filter

Parameters

NodeAggregateId $entryNodeAggregateId
FindSubtreeFilter $filter

Return Value

Subtree|null

the recursive tree of all matching nodes, or NULL if the entry node is not accessible

Nodes findAncestorNodes(NodeAggregateId $entryNodeAggregateId, FindAncestorNodesFilter $filter)

Recursively find all nodes above the $entryNodeAggregateId that match the specified $filter and return them as a flat list

Parameters

NodeAggregateId $entryNodeAggregateId
FindAncestorNodesFilter $filter

Return Value

Nodes

int countAncestorNodes(NodeAggregateId $entryNodeAggregateId, CountAncestorNodesFilter $filter)

Count all nodes above the $entryNodeAggregateId that match the specified $filter

Parameters

NodeAggregateId $entryNodeAggregateId
CountAncestorNodesFilter $filter

Return Value

int

Node|null findClosestNode(NodeAggregateId $entryNodeAggregateId, FindClosestNodeFilter $filter)

Find the closest matching node, the entry node itself or the first ancestors of the $entryNodeAggregateId, that match the specified $filter and return it Note: in contrast to {findAncestorNodes()} the resulting node will be the entry node if it matches the filter!

Parameters

NodeAggregateId $entryNodeAggregateId
FindClosestNodeFilter $filter

Return Value

Node|null

the closest node that matches the given $filter, or NULL if no matching node was found

Nodes findDescendantNodes(NodeAggregateId $entryNodeAggregateId, FindDescendantNodesFilter $filter)

Recursively find all nodes underneath the $entryNodeAggregateId that match the specified $filter and return them as a flat list

Note: This is basically a set-based view of descendant nodes; so the ordering should not be relied upon

Parameters

NodeAggregateId $entryNodeAggregateId
FindDescendantNodesFilter $filter

Return Value

Nodes

int countDescendantNodes(NodeAggregateId $entryNodeAggregateId, CountDescendantNodesFilter $filter)

Count all nodes underneath the $entryNodeAggregateId that match the specified $filter

Parameters

NodeAggregateId $entryNodeAggregateId
CountDescendantNodesFilter $filter

Return Value

int

int countNodes()

Count all nodes in this subgraph, including inaccessible ones!

Return Value

int