Skip to content

Commit

Permalink
Merge pull request #69 from queoGmbH/task/adjustToRenamedNodeType
Browse files Browse the repository at this point in the history
TASK: Adjust to renamed NodeTypeConstraints
  • Loading branch information
mficzel authored Nov 3, 2023
2 parents 757ba63 + 1daf464 commit da9ba82
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Classes/FlowQuery/ReferencedTaxonomiesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Neos\ContentRepository\Core\NodeType\NodeTypeNames;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindReferencesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -57,7 +57,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$nodes = [];
$findReferencesFilter = FindReferencesFilter::create(
nodeTypeConstraints: NodeTypeConstraints::create(
nodeTypes: NodeTypeCriteria::create(
NodeTypeNames::fromArray([$this->taxonomyService->getTaxonomyNodeTypeName()]),
NodeTypeNames::createEmpty()
),
Expand Down
4 changes: 2 additions & 2 deletions Classes/FlowQuery/ReferencingTaxonomiesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace Sitegeist\Taxonomy\FlowQuery;

use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindBackReferencesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$nodes = [];
$findBackReferencesFilter = FindBackReferencesFilter::create(
nodeTypeConstraints: NodeTypeConstraints::fromFilterString('Neos.Neos:Document'),
nodeTypes: NodeTypeCriteria::fromFilterString('Neos.Neos:Document'),
referenceName: 'taxonomyReferences'
);

Expand Down
5 changes: 2 additions & 3 deletions Classes/FlowQuery/SubTaxonomiesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

namespace Sitegeist\Taxonomy\FlowQuery;

use Neos\ContentRepository\Core\NodeType\NodeTypeName;
use Neos\ContentRepository\Core\NodeType\NodeTypeNames;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindSubtreeFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -60,7 +59,7 @@ public function evaluate(FlowQuery $flowQuery, array $arguments)
$nodes = Nodes::createEmpty();

$filter = FindSubtreeFilter::create(
NodeTypeConstraints::create(
NodeTypeCriteria::create(
NodeTypeNames::fromArray([$this->taxonomyService->getTaxonomyNodeTypeName()]),
NodeTypeNames::createEmpty()
)
Expand Down
5 changes: 2 additions & 3 deletions Classes/FlowQuery/WithSubTaxonomiesOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

namespace Sitegeist\Taxonomy\FlowQuery;

use Neos\ContentRepository\Core\NodeType\NodeTypeName;
use Neos\ContentRepository\Core\NodeType\NodeTypeNames;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindSubtreeFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
Expand Down Expand Up @@ -62,7 +61,7 @@ public function canEvaluate($context)
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
$filter = FindSubtreeFilter::create(
NodeTypeConstraints::create(
nodeTypes: NodeTypeCriteria::create(
NodeTypeNames::fromArray([$this->taxonomyService->getTaxonomyNodeTypeName()]),
NodeTypeNames::createEmpty()
)
Expand Down
8 changes: 4 additions & 4 deletions Classes/Service/TaxonomyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindSubtreeFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath;
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodeTypeConstraints;
use Neos\ContentRepository\Core\Projection\ContentGraph\Subtree;
use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints;
use Neos\ContentRepository\Core\Projection\Workspace\Workspace;
Expand Down Expand Up @@ -84,7 +84,7 @@ public function findVocabularyForNode(Node $node): Node
$ancestors = $subgraph->findAncestorNodes(
$node->nodeAggregateId,
FindAncestorNodesFilter::create(
NodeTypeConstraints::create(
nodeTypes: NodeTypeCriteria::create(
NodeTypeNames::fromArray([ $this->getVocabularyNodeTypeName()]),
NodeTypeNames::createEmpty()
)
Expand Down Expand Up @@ -131,7 +131,7 @@ public function findAllVocabularies(ContentSubgraphInterface $subgraph): Nodes
return $subgraph->findChildNodes(
$root->nodeAggregateId,
FindChildNodesFilter::create(
NodeTypeConstraints::create(
nodeTypes: NodeTypeCriteria::create(
NodeTypeNames::fromArray([$this->getVocabularyNodeTypeName()]),
NodeTypeNames::createEmpty()
)
Expand Down Expand Up @@ -171,7 +171,7 @@ public function findSubtree(Node $StartNode): ?Subtree
$vocabularySubtree = $subgraph->findSubtree(
$StartNode->nodeAggregateId,
FindSubtreeFilter::create(
NodeTypeConstraints::create(
nodeTypes: NodeTypeCriteria::create(
NodeTypeNames::fromArray([$this->getTaxonomyNodeTypeName(), $this->getVocabularyNodeTypeName()]),
NodeTypeNames::createEmpty()
)
Expand Down

0 comments on commit da9ba82

Please sign in to comment.