diff --git a/Classes/Command/TaxonomyCommandController.php b/Classes/Command/TaxonomyCommandController.php index 3649666..cfd197c 100644 --- a/Classes/Command/TaxonomyCommandController.php +++ b/Classes/Command/TaxonomyCommandController.php @@ -74,7 +74,6 @@ public function taxonomiesCommand(string $vocabulary, string $path = ''): void if (!$startPoint) { $this->outputLine('nothing found'); $this->quit(1); - throw new StopCommandException(); } $subtree = $this->taxonomyService->findSubtree($startPoint); diff --git a/Classes/Service/TaxonomyService.php b/Classes/Service/TaxonomyService.php index 7ab1609..bc42328 100644 --- a/Classes/Service/TaxonomyService.php +++ b/Classes/Service/TaxonomyService.php @@ -21,8 +21,8 @@ use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\NodeType\NodeTypeNames; use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface; -use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter; +use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindClosestNodeFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindSubtreeFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\NodeType\NodeTypeCriteria; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; @@ -81,9 +81,9 @@ public function findVocabularyForNode(Node $node): Node { $subgraph = $this->crRegistry->subgraphForNode($node); - $ancestors = $subgraph->findAncestorNodes( + $vocabularyNode = $subgraph->findClosestNode( $node->nodeAggregateId, - FindAncestorNodesFilter::create( + FindClosestNodeFilter::create( nodeTypes: NodeTypeCriteria::create( NodeTypeNames::fromArray([ $this->getVocabularyNodeTypeName()]), NodeTypeNames::createEmpty() @@ -91,8 +91,8 @@ public function findVocabularyForNode(Node $node): Node ) ); - if ($result = $ancestors->first()) { - return $result; + if ($vocabularyNode) { + return $vocabularyNode; } throw new \InvalidArgumentException('node seems to be outside of vocabulary'); diff --git a/Resources/Private/Fusion/Backend/Form/Taxonomy.fusion b/Resources/Private/Fusion/Backend/Form/Taxonomy.fusion index 2b4f1dd..5b9f3de 100644 --- a/Resources/Private/Fusion/Backend/Form/Taxonomy.fusion +++ b/Resources/Private/Fusion/Backend/Form/Taxonomy.fusion @@ -26,7 +26,12 @@ prototype(Sitegeist.Taxonomy:Form.Taxonomy) < prototype(Neos.Fusion:Component) { {props.i18nTaxonomy.id('properties.name')} : {props.defaultTaxonomy.properties.name} - +
diff --git a/Resources/Private/Fusion/Backend/Form/Vocabulary.fusion b/Resources/Private/Fusion/Backend/Form/Vocabulary.fusion index a238eb2..8cee6ed 100644 --- a/Resources/Private/Fusion/Backend/Form/Vocabulary.fusion +++ b/Resources/Private/Fusion/Backend/Form/Vocabulary.fusion @@ -24,7 +24,13 @@ prototype(Sitegeist.Taxonomy:Form.Vocabulary) < prototype(Neos.Fusion:Component) - +
diff --git a/Resources/Private/Fusion/Backend/Views/Taxonomy.List.fusion b/Resources/Private/Fusion/Backend/Views/Taxonomy.List.fusion index d70c493..6921eb3 100644 --- a/Resources/Private/Fusion/Backend/Views/Taxonomy.List.fusion +++ b/Resources/Private/Fusion/Backend/Views/Taxonomy.List.fusion @@ -107,7 +107,7 @@ prototype(Sitegeist.Taxonomy:Views.Module.Taxonomy.List.Item) < prototype(Neos.F - +  
- +