diff --git a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php index 4a657dc507f..054316a2022 100644 --- a/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php +++ b/Neos.ContentRepository.Core/Classes/Feature/NodeMove/Command/MoveNodeAggregate.php @@ -72,7 +72,7 @@ private function __construct( * @param WorkspaceName $workspaceName The workspace in which the move operation is to be performed * @param DimensionSpacePoint $dimensionSpacePoint This is one of the *covered* dimension space points of the node aggregate and not necessarily one of the occupied ones. This allows us to move virtual specializations only when using the scatter strategy * @param NodeAggregateId $nodeAggregateId The id of the node aggregate to move - * @param RelationDistributionStrategy $relationDistributionStrategy The relation distribution strategy to be used ({@see RelationDistributionStrategy}) + * @param RelationDistributionStrategy $relationDistributionStrategy The relation distribution strategy to be used ({@see RelationDistributionStrategy}). * @param NodeAggregateId|null $newParentNodeAggregateId The id of the new parent node aggregate. If given, it enforces that all nodes in the given aggregate are moved into nodes of the parent aggregate, even if the given siblings belong to other parents. In latter case, those siblings are ignored * @param NodeAggregateId|null $newPrecedingSiblingNodeAggregateId The id of the new preceding sibling node aggregate. If given and no successor found, it is attempted to insert the moved nodes right after nodes of this aggregate. In dimension space points this aggregate does not cover, other siblings, in order of proximity, are tried to be used instead * @param NodeAggregateId|null $newSucceedingSiblingNodeAggregateId The id of the new succeeding sibling node aggregate. If given, it is attempted to insert the moved nodes right before nodes of this aggregate. In dimension space points this aggregate does not cover, the preceding sibling is tried to be used instead diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php index 77c3e27fbfa..56e88b3e18e 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php @@ -291,25 +291,6 @@ public function getDeclaredSuperTypes(): array }); } - /** - * Returns whether this node type (or any parent type) is an *aggregate*. - * - * The most prominent *aggregate* is a Document and everything which inherits from it, like a Page. - * - * If a node type is marked as aggregate, it means that: - * - * - the node type can "live on its own", i.e. can be part of an external URL - * - when moving this node, all node variants are also moved (across all dimensions) - * - Recursive copying only happens *inside* this aggregate, and stops at nested aggregates. - * - * @return boolean true if the node type is an aggregate - * @api - */ - public function isAggregate(): bool - { - return $this->getConfiguration('aggregate') === true; - } - /** * If this node type or any of the direct or indirect super types * has the given name. diff --git a/Neos.ContentRepository.Core/Tests/Unit/NodeType/NodeTypeManagerTest.php b/Neos.ContentRepository.Core/Tests/Unit/NodeType/NodeTypeManagerTest.php index 97c50d28f27..24c77bdc8b5 100644 --- a/Neos.ContentRepository.Core/Tests/Unit/NodeType/NodeTypeManagerTest.php +++ b/Neos.ContentRepository.Core/Tests/Unit/NodeType/NodeTypeManagerTest.php @@ -114,7 +114,6 @@ protected function prepareNodeTypeManager(array $nodeTypesFixtureData) ], 'Neos.ContentRepository.Testing:Document' => [ 'abstract' => true, - 'aggregate' => true ], 'Neos.ContentRepository.Testing:Page' => [ 'superTypes' => ['Neos.ContentRepository.Testing:Document' => true], @@ -273,23 +272,6 @@ public function getNodeTypeAllowsToRetrieveFinalNodeTypes() self::assertTrue($this->nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:MyFinalType')->isFinal()); } - /** - * @test - */ - public function aggregateNodeTypeFlagIsFalseByDefault() - { - self::assertFalse($this->nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:Text')->isAggregate()); - } - - /** - * @test - */ - public function aggregateNodeTypeFlagIsInherited() - { - self::assertTrue($this->nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:Document')->isAggregate()); - self::assertTrue($this->nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:Page')->isAggregate()); - } - /** * @test */ diff --git a/Neos.ContentRepositoryRegistry/Resources/Private/Schema/NodeTypes.schema.yaml b/Neos.ContentRepositoryRegistry/Resources/Private/Schema/NodeTypes.schema.yaml index 1903649845f..bdeececdb70 100644 --- a/Neos.ContentRepositoryRegistry/Resources/Private/Schema/NodeTypes.schema.yaml +++ b/Neos.ContentRepositoryRegistry/Resources/Private/Schema/NodeTypes.schema.yaml @@ -7,7 +7,6 @@ additionalProperties: 'class': { type: string, format: class-name } 'abstract': { type: boolean, description: "Abstract node type for default/mixin usage" } 'final': { type: boolean, description: "If final, this node type cannot be subclassed" } - 'aggregate': { type: boolean, description: "INTERNAL. If aggregate, this node type is something like a Document. If not aggregate, it is seen as part of an aggregate node type - has influence on how e.g. moving of nodes across dimensions work." } 'superTypes': type: dictionary diff --git a/Neos.Neos/Classes/Controller/Service/NodesController.php b/Neos.Neos/Classes/Controller/Service/NodesController.php index 5b40ce7ddcf..d2ad504007b 100644 --- a/Neos.Neos/Classes/Controller/Service/NodesController.php +++ b/Neos.Neos/Classes/Controller/Service/NodesController.php @@ -331,17 +331,15 @@ protected function addExistingNodeVariantInformationToResponse( // If the node exists in another dimension, we want to know how many nodes in the rootline are also // missing for the target dimension. This is needed in the UI to tell the user if nodes will be // materialized recursively upwards in the rootline. To find the node path for the given identifier, - // we just use the first result. This is a safe assumption at least for "Document" nodes (aggregate=true), - // because they are always moved in-sync. - if ($nodeTypeManager->getNodeType($nodeAggregate->nodeTypeName)?->isAggregate()) { + // we just use the first result. This is a safe assumption at least for "Document" nodes , + // because they are always moved in-sync by default via (options.moveNodeStrategy=gatherAll). + if ($nodeTypeManager->getNodeType($nodeAggregate->nodeTypeName)?->isOfType(NodeTypeNameFactory::NAME_DOCUMENT)) { // TODO: we would need the SourceDimensions parameter (as in Create()) to ensure the correct // rootline is traversed. Here, we, as a workaround, simply use the 1st aggregate for now. $missingNodesOnRootline = 0; while ( - $parentAggregate = self::firstNodeAggregate( - $contentGraph->findParentNodeAggregates($identifier) - ) + $parentAggregate = $contentGraph->findParentNodeAggregates($identifier)->first() ) { if (!$parentAggregate->coversDimensionSpacePoint($dimensionSpacePoint)) { $missingNodesOnRootline++; @@ -361,18 +359,6 @@ protected function addExistingNodeVariantInformationToResponse( } } - /** - * @param iterable $nodeAggregates - * @return NodeAggregate|null - */ - private static function firstNodeAggregate(iterable $nodeAggregates): ?NodeAggregate - { - foreach ($nodeAggregates as $nodeAggregate) { - return $nodeAggregate; - } - return null; - } - /** * Adopt (translate) the given node and parents that are not yet visible to the given context * diff --git a/Neos.Neos/Documentation/References/NodeTypeDefinition.rst b/Neos.Neos/Documentation/References/NodeTypeDefinition.rst index 0af58d7631d..f7680a41b77 100644 --- a/Neos.Neos/Documentation/References/NodeTypeDefinition.rst +++ b/Neos.Neos/Documentation/References/NodeTypeDefinition.rst @@ -14,16 +14,6 @@ The following options are allowed for defining a NodeType: Abstract node types are useful when using inheritance and composition, so mark base node types and mixins as abstract. -``aggregate`` - A boolean flag, marking a node type as *aggregate*. If a node type is marked as aggregate, it means that: - - - the node type can "live on its own", i.e. can be part of an external URL - - when moving this node, all node variants are also moved (across all dimensions) - - Recursive copying only happens *inside* this aggregate, and stops at nested aggregates. - - The most prominent *aggregate* is `Neos.Neos:Document` and everything which inherits from it, like - `Neos.NodeTypes:Page`. - ``superTypes`` An array of parent node types as keys with a boolean value:: diff --git a/Neos.Neos/NodeTypes/Mixin/Document.yaml b/Neos.Neos/NodeTypes/Mixin/Document.yaml index c3277bf4344..c13185e412a 100644 --- a/Neos.Neos/NodeTypes/Mixin/Document.yaml +++ b/Neos.Neos/NodeTypes/Mixin/Document.yaml @@ -6,7 +6,6 @@ 'Neos.Neos:Node': true 'Neos.Neos:Hidable': true abstract: true - aggregate: true constraints: nodeTypes: '*': false