diff --git a/Classes/Domain/Service/NodePropertyConverterService.php b/Classes/Domain/Service/NodePropertyConverterService.php index 70a4faf39a..3451c477d8 100644 --- a/Classes/Domain/Service/NodePropertyConverterService.php +++ b/Classes/Domain/Service/NodePropertyConverterService.php @@ -14,11 +14,11 @@ namespace Neos\Neos\Ui\Domain\Service; +use Neos\ContentRepository\Core\Feature\SubtreeTagging\Dto\SubtreeTag; use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindReferencesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\References; -use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Annotations as Flow; use Neos\Flow\Log\ThrowableStorageInterface; @@ -110,14 +110,7 @@ public function injectThrowableStorage(ThrowableStorageInterface $throwableStora public function getProperty(Node $node, $propertyName) { if ($propertyName === '_hidden') { - $contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId); - $nodeHiddenStateFinder = $contentRepository->projectionState(NodeHiddenStateFinder::class); - - return $nodeHiddenStateFinder->findHiddenState( - $node->subgraphIdentity->contentStreamId, - $node->subgraphIdentity->dimensionSpacePoint, - $node->nodeAggregateId - )->isHidden; + return $node->tags->contain(SubtreeTag::fromString('disabled')); } $propertyType = $this->getNodeType($node)->getPropertyType($propertyName); diff --git a/Classes/Fusion/Helper/NodeInfoHelper.php b/Classes/Fusion/Helper/NodeInfoHelper.php index daaf228364..fc4b2390ab 100644 --- a/Classes/Fusion/Helper/NodeInfoHelper.php +++ b/Classes/Fusion/Helper/NodeInfoHelper.php @@ -11,10 +11,10 @@ * source code. */ +use Neos\ContentRepository\Core\Feature\SubtreeTagging\Dto\SubtreeTag; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindChildNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; -use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Eel\ProtectedContextAwareInterface; @@ -85,9 +85,6 @@ public function renderNodeWithMinimalPropertiesAndChildrenInformation( ActionRequest $actionRequest = null, string $nodeTypeFilterOverride = null ): ?array { - $contentRepository = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId); - $nodeHiddenStateFinder = $contentRepository->projectionState(NodeHiddenStateFinder::class); - /** @todo implement custom node policy service if (!$this->nodePolicyService->isNodeTreePrivilegeGranted($node)) { return null; @@ -98,11 +95,7 @@ public function renderNodeWithMinimalPropertiesAndChildrenInformation( $nodeInfo['properties'] = [ // if we are only rendering the tree state, // ensure _isHidden is sent to hidden nodes are correctly shown in the tree. - '_hidden' => $nodeHiddenStateFinder->findHiddenState( - $node->subgraphIdentity->contentStreamId, - $node->subgraphIdentity->dimensionSpacePoint, - $node->nodeAggregateId - )->isHidden, + '_hidden' => $node->tags->contain(SubtreeTag::fromString('disabled')), '_hiddenInIndex' => $node->getProperty('_hiddenInIndex'), '_hasTimeableNodeVisibility' => $node->getProperty('enableAfterDateTime') instanceof \DateTimeInterface @@ -143,6 +136,7 @@ public function renderNodeWithPropertiesAndChildrenInformation( $nodeInfo = $this->getBasicNodeInformation($node); $nodeInfo['properties'] = $this->nodePropertyConverterService->getPropertiesArray($node); + $nodeInfo['tags'] = $node->tags; $nodeInfo['isFullyLoaded'] = true; if ($actionRequest !== null) {