Skip to content

Commit

Permalink
TASK: Adjust to renamed NodeTypeConstraints
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed Sep 22, 2023
1 parent 5c4d8ff commit f3210a0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -75,14 +75,14 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
$contentRepository = $this->contentRepositoryRegistry->get($documentNode->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);

$baseNodeTypeConstraints = NodeTypeConstraints::fromFilterString($baseNodeType);
$baseNodeTypeConstraints = NodeTypeCriteria::fromFilterString($baseNodeType);

$subgraph = $this->contentRepositoryRegistry->subgraphForNode($documentNode);

$ancestors = $subgraph->findAncestorNodes(
$documentNode->nodeAggregateId,
FindAncestorNodesFilter::create(
NodeTypeConstraints::fromFilterString('Neos.Neos:Document')
NodeTypeCriteria::fromFilterString('Neos.Neos:Document')
)
);

Expand Down Expand Up @@ -118,7 +118,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
) {
foreach ($subgraph->findChildNodes(
$baseNode->nodeAggregateId,
FindChildNodesFilter::create(nodeTypeConstraints: $baseNodeTypeConstraints)
FindChildNodesFilter::create(nodeTypes: $baseNodeTypeConstraints)
) as $childNode) {
$nodes[$childNode->nodeAggregateId->value] = $childNode;
$gatherNodesRecursively($nodes, $childNode, $level + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -76,7 +76,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)

foreach ($subgraph->findChildNodes(
$contextNode->nodeAggregateId,
FindChildNodesFilter::create(nodeTypeConstraints: $arguments[0] ?? null)
FindChildNodesFilter::create(nodeTypes: $arguments[0] ?? null)
) as $childNode) {
if (!isset($outputNodeIdentifiers[$childNode->nodeAggregateId->value])) {
$output[] = $childNode;
Expand Down
4 changes: 2 additions & 2 deletions Classes/FlowQueryOperations/SearchOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\SearchTerm;
use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
Expand Down Expand Up @@ -80,7 +80,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void
$filter = $filter->with(searchTerm: $arguments[0]);
}
if (isset($arguments[1]) && $arguments[1] !== '') {
$filter = $filter->with(nodeTypeConstraints: $arguments[1]);
$filter = $filter->with(nodeTypes: $arguments[1]);
}
$nodes = $subgraph->findDescendantNodes(
$contextNode->nodeAggregateId,
Expand Down
6 changes: 3 additions & 3 deletions Classes/Fusion/Helper/NodeInfoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@ protected function renderChildrenInformation(Node $node, string $nodeTypeFilterS

$documentChildNodes = $subgraph->findChildNodes(
$node->nodeAggregateId,
FindChildNodesFilter::create(nodeTypeConstraints: $nodeTypeFilterString)
FindChildNodesFilter::create(nodeTypes: $nodeTypeFilterString)
);
// child nodes for content tree, must not include those nodes filtered out by `baseNodeType`
$contentChildNodes = $subgraph->findChildNodes(
$node->nodeAggregateId,
FindChildNodesFilter::create(
nodeTypeConstraints: $this->buildContentChildNodeFilterString()
nodeTypes: $this->buildContentChildNodeFilterString()
)
);
$childNodes = $documentChildNodes->merge($contentChildNodes);
Expand Down Expand Up @@ -511,7 +511,7 @@ private function getChildNodes(Node $node, string $nodeTypeFilterString): Nodes
return $this->contentRepositoryRegistry->subgraphForNode($node)
->findChildNodes(
$node->nodeAggregateId,
FindChildNodesFilter::create(nodeTypeConstraints: $nodeTypeFilterString)
FindChildNodesFilter::create(nodeTypes: $nodeTypeFilterString)
);
}

Expand Down

0 comments on commit f3210a0

Please sign in to comment.