Skip to content

Commit 4bd6825

Browse files
authored
Merge pull request #3625 from neos/task/4522-renameNodeTypeConstraints
TASK: Adjust to renamed `NodeTypeConstraints`
2 parents 5306eea + 8c1b108 commit 4bd6825

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

Classes/ContentRepository/Service/WorkspaceService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
9898
$node = $subgraph->findNodeById($change->nodeAggregateId);
9999

100100
if ($node instanceof Node) {
101-
$documentNode = $subgraph->findClosestNode($node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
101+
$documentNode = $subgraph->findClosestNode($node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
102102
if ($documentNode instanceof Node) {
103103
$contentRepository = $this->contentRepositoryRegistry->get($documentNode->subgraphIdentity->contentRepositoryId);
104104
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);

Classes/Domain/Model/AbstractChange.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function updateWorkspaceInfo(): void
6767
{
6868
if (!is_null($this->subject)) {
6969
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->subject);
70-
$documentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
70+
$documentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
7171
if (!is_null($documentNode)) {
7272
$contentRepository = $this->contentRepositoryRegistry->get($this->subject->subgraphIdentity->contentRepositoryId);
7373
$workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId(

Classes/Domain/Model/Changes/Remove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function apply(): void
7070
$this->updateWorkspaceInfo();
7171

7272
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->subject);
73-
$closestDocumentParentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
73+
$closestDocumentParentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
7474
$command = RemoveNodeAggregate::create(
7575
$subject->subgraphIdentity->contentStreamId,
7676
$subject->nodeAggregateId,

Classes/Domain/Model/Feedback/Operations/ReloadDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function serializePayload(ControllerContext $controllerContext): array
7373
$nodeInfoHelper = new NodeInfoHelper();
7474

7575
$documentNode = $this->contentRepositoryRegistry->subgraphForNode($this->node)
76-
->findClosestNode($this->node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
76+
->findClosestNode($this->node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
7777

7878
if ($documentNode) {
7979
return [

Classes/FlowQueryOperations/NeosUiDefaultNodesOperation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter;
1616
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
1717
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
18-
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
18+
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
1919
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
2020
use Neos\Eel\FlowQuery\FlowQuery;
2121
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
@@ -75,14 +75,14 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
7575
$contentRepository = $this->contentRepositoryRegistry->get($documentNode->subgraphIdentity->contentRepositoryId);
7676
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
7777

78-
$baseNodeTypeConstraints = NodeTypeConstraints::fromFilterString($baseNodeType);
78+
$baseNodeTypeConstraints = NodeTypeCriteria::fromFilterString($baseNodeType);
7979

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

8282
$ancestors = $subgraph->findAncestorNodes(
8383
$documentNode->nodeAggregateId,
8484
FindAncestorNodesFilter::create(
85-
NodeTypeConstraints::fromFilterString('Neos.Neos:Document')
85+
NodeTypeCriteria::fromFilterString('Neos.Neos:Document')
8686
)
8787
);
8888

@@ -117,7 +117,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
117117
) {
118118
foreach ($subgraph->findChildNodes(
119119
$baseNode->nodeAggregateId,
120-
FindChildNodesFilter::create(nodeTypeConstraints: $baseNodeTypeConstraints)
120+
FindChildNodesFilter::create(nodeTypes: $baseNodeTypeConstraints)
121121
) as $childNode) {
122122
$nodes[$childNode->nodeAggregateId->value] = $childNode;
123123
$gatherNodesRecursively($nodes, $childNode, $level + 1);

Classes/FlowQueryOperations/NeosUiFilteredChildrenOperation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
1515
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
1616
use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser;
17-
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
17+
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
1818
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
1919
use Neos\Eel\FlowQuery\FlowQuery;
2020
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
@@ -76,7 +76,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
7676

7777
foreach ($subgraph->findChildNodes(
7878
$contextNode->nodeAggregateId,
79-
FindChildNodesFilter::create(nodeTypeConstraints: $arguments[0] ?? null)
79+
FindChildNodesFilter::create(nodeTypes: $arguments[0] ?? null)
8080
) as $childNode) {
8181
if (!isset($outputNodeIdentifiers[$childNode->nodeAggregateId->value])) {
8282
$output[] = $childNode;

Classes/FlowQueryOperations/SearchOperation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
1616
use Neos\ContentRepository\Core\Projection\ContentGraph\SearchTerm;
1717
use Neos\ContentRepository\Core\NodeType\NodeTypeConstraintParser;
18-
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
18+
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
1919
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateIds;
2020
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
2121
use Neos\Eel\FlowQuery\FlowQuery;
@@ -80,7 +80,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): void
8080
$filter = $filter->with(searchTerm: $arguments[0]);
8181
}
8282
if (isset($arguments[1]) && $arguments[1] !== '') {
83-
$filter = $filter->with(nodeTypeConstraints: $arguments[1]);
83+
$filter = $filter->with(nodeTypes: $arguments[1]);
8484
}
8585
$nodes = $subgraph->findDescendantNodes(
8686
$contextNode->nodeAggregateId,

Classes/Fusion/Helper/NodeInfoHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ protected function renderChildrenInformation(Node $node, string $nodeTypeFilterS
245245

246246
$documentChildNodes = $subgraph->findChildNodes(
247247
$node->nodeAggregateId,
248-
FindChildNodesFilter::create(nodeTypeConstraints: $nodeTypeFilterString)
248+
FindChildNodesFilter::create(nodeTypes: $nodeTypeFilterString)
249249
);
250250
// child nodes for content tree, must not include those nodes filtered out by `baseNodeType`
251251
$contentChildNodes = $subgraph->findChildNodes(
252252
$node->nodeAggregateId,
253253
FindChildNodesFilter::create(
254-
nodeTypeConstraints: $this->buildContentChildNodeFilterString()
254+
nodeTypes: $this->buildContentChildNodeFilterString()
255255
)
256256
);
257257
$childNodes = $documentChildNodes->merge($contentChildNodes);
@@ -480,7 +480,7 @@ private function getChildNodes(Node $node, string $nodeTypeFilterString): Nodes
480480
return $this->contentRepositoryRegistry->subgraphForNode($node)
481481
->findChildNodes(
482482
$node->nodeAggregateId,
483-
FindChildNodesFilter::create(nodeTypeConstraints: $nodeTypeFilterString)
483+
FindChildNodesFilter::create(nodeTypes: $nodeTypeFilterString)
484484
);
485485
}
486486

0 commit comments

Comments
 (0)