diff --git a/Neos.Neos/Classes/Utility/NodeTypeWithFallbackProvider.php b/Neos.Neos/Classes/Utility/NodeTypeWithFallbackProvider.php index 67057da1226..5cc304c3fc1 100644 --- a/Neos.Neos/Classes/Utility/NodeTypeWithFallbackProvider.php +++ b/Neos.Neos/Classes/Utility/NodeTypeWithFallbackProvider.php @@ -7,20 +7,18 @@ use Neos\ContentRepository\Core\NodeType\NodeType; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; -use Neos\Flow\Annotations as Flow; use Neos\Neos\Domain\Service\NodeTypeNameFactory; /** * Utility trait for retrieving node types for nodes with a built-in fallback mechanism + * + * @property ContentRepositoryRegistry $contentRepositoryRegistry */ trait NodeTypeWithFallbackProvider { - #[Flow\Inject] - protected ContentRepositoryRegistry $_contentRepositoryRegistry; - protected function getNodeType(Node $node): NodeType { - $nodeTypeManager = $this->_contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId)->getNodeTypeManager(); + $nodeTypeManager = $this->contentRepositoryRegistry->get($node->subgraphIdentity->contentRepositoryId)->getNodeTypeManager(); return $nodeTypeManager->hasNodeType($node->nodeTypeName) ? $nodeTypeManager->getNodeType($node->nodeTypeName)