Skip to content

Commit

Permalink
Adapt to subtree tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsunet committed Apr 19, 2024
1 parent 68d3cc2 commit 05e6552
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Neos.Neos/Classes/Fusion/Helper/NodeHelper.php
Expand Up @@ -14,14 +14,14 @@

namespace Neos\Neos\Fusion\Helper;

use Neos\ContentRepository\Core\Feature\SubtreeTagging\Dto\SubtreeTag;
use Neos\ContentRepository\Core\NodeType\NodeType;
use Neos\ContentRepository\Core\Projection\ContentGraph\AbsoluteNodePath;
use Neos\ContentRepository\Core\Projection\ContentGraph\ContentSubgraphInterface;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\CountAncestorNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath;
use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\ProtectedContextAwareInterface;
use Neos\Flow\Annotations as Flow;
Expand Down Expand Up @@ -157,15 +157,9 @@ public function subgraphForNode(Node $node): ContentSubgraphInterface
return $this->contentRepositoryRegistry->subgraphForNode($node);
}

public function isNodeStateHidden(Node $node): bool
public function isDisabled(Node $node): bool
{
$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::disabled());
}

/**
Expand Down

0 comments on commit 05e6552

Please sign in to comment.