final class NodeAggregateCommandHandler implements CommandHandlerInterface (View source)

internal  from userland, you'll use ContentRepository::handle to dispatch commands
 

Traits

Methods

requireContentStream(WorkspaceName $workspaceName, CommandHandlingDependencies $commandHandlingDependencies)

No description

void
requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint)

No description

requireNodeType(NodeTypeName $nodeTypeName)

No description

void
requireNodeTypeToNotBeAbstract(NodeType $nodeType)

No description

void
requireNodeTypeToBeOfTypeRoot(NodeType $nodeType)

No description

void
requireNodeTypeToNotBeOfTypeRoot(NodeType $nodeType)

No description

void
requireRootNodeTypeToBeUnoccupied(ContentGraphInterface $contentGraph, NodeTypeName $nodeTypeName)

No description

void
requireNodeTypeToDeclareProperty(NodeTypeName $nodeTypeName, PropertyName $propertyName)

No description

void
requireNodeTypeToDeclareReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName)

No description

void
void
requireNodeTypeToAllowNodesOfTypeInReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName, NodeTypeName $nodeTypeNameInQuestion)

No description

void
requireConstraintsImposedByAncestorsAreMet(ContentGraphInterface $contentGraph, NodeType $nodeType, array $parentNodeAggregateIds)

No description

void
requireNodeTypeConstraintsImposedByParentToBeMet(NodeType $parentsNodeType, NodeType $nodeType)

No description

bool
areNodeTypeConstraintsImposedByParentValid(NodeType $parentsNodeType, NodeType $nodeType)

No description

void
requireNodeTypeConstraintsImposedByGrandparentToBeMet(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

bool
areNodeTypeConstraintsImposedByGrandparentValid(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

void
requireProjectedNodeAggregateToNotExist(ContentGraphInterface $contentGraph, NodeAggregateId $nodeAggregateId)

No description

requireProjectedParentNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint)

No description

void
requireNodeAggregateToCoverDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

void
requireNodeAggregateToCoverDimensionSpacePoints(NodeAggregate $nodeAggregate, DimensionSpacePointSet $dimensionSpacePointSet)

No description

void
requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate, string|null $extraReason = '.')

No description

void
requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggregate)

No description

void
requireNodeAggregateToNotBeDescendant(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate)

No description

void
requireNodeAggregateToBeSibling(ContentGraphInterface $contentGraph, NodeAggregateId $referenceNodeAggregateId, NodeAggregateId $siblingNodeAggregateId, DimensionSpacePoint $dimensionSpacePoint)

No description

void
requireNodeAggregateToBeChild(ContentGraphInterface $contentGraph, NodeAggregateId $childNodeAggregateId, NodeAggregateId $parentNodeAggregateId, DimensionSpacePoint $dimensionSpacePoint)

No description

void
requireNodeNameToBeUncovered(ContentGraphInterface $contentGraph, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $exclusivelyAllowedNodeAggregateId = null)

No description

void
requireNodeAggregateToOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

void
requireNodeAggregateToNotOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

void
validateReferenceProperties(ReferenceName $referenceName, PropertyValuesToWrite $referenceProperties, NodeTypeName $nodeTypeName)

No description

ExpectedVersion
getExpectedVersionOfContentStream(ContentStreamId $contentStreamId, CommandHandlingDependencies $commandHandlingDependencies)

No description

handleUntagSubtree(UntagSubtree $command, CommandHandlingDependencies $commandHandlingDependencies)

No description

void
requireNodeAggregateNotToBeTethered(NodeAggregate $nodeAggregate)

No description

array
collectNodeSpecializationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, array $events)

No description

array
collectNodeGeneralizationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, array $events)

No description

array
collectNodePeerVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, array $events)

No description

createEventsForMissingTetheredNode(ContentGraphInterface $contentGraph, NodeAggregateId $parentNodeAggregateId, NodeTypeName $parentNodeTypeName, DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant, OriginDimensionSpacePoint $originDimensionSpacePoint, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, NodeAggregateId|null $tetheredNodeAggregateId)

This is the remediation action for non-existing tethered nodes.

array
createEventsForMissingTetheredNodeAggregate(ContentGraphInterface $contentGraph, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints, CoverageByOrigin $coverageByOrigin, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $succeedingSiblingNodeAggregateId, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath)

No description

createEventsForWronglyTypedNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeTypeName $newNodeTypeName, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath, NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy $conflictResolutionStrategy, NodeAggregateIds $alreadyRemovedNodeAggregateIds)

No description

__construct(NodeTypeManager $nodeTypeManager, ContentDimensionZookeeper $contentDimensionZookeeper, InterDimensionalVariationGraph $interDimensionalVariationGraph, PropertyConverter $propertyConverter)

No description

handle(CommandInterface|RebasableToOtherWorkspaceInterface $command, CommandHandlingDependencies $commandHandlingDependencies)

"simple" command handlers return EventsToPublish directly

void
withoutAncestorNodeTypeConstraintChecks(Closure $callback)

Use this closure to run code with the Ancestor Node Type Checks disabled; e.g.

Details

protected NodeTypeManager getNodeTypeManager()

No description

Return Value

NodeTypeManager

protected DimensionSpacePointSet getAllowedDimensionSubspace()

No description

Return Value

DimensionSpacePointSet

protected ContentStreamId requireContentStream(WorkspaceName $workspaceName, CommandHandlingDependencies $commandHandlingDependencies)

No description

Parameters

WorkspaceName $workspaceName
CommandHandlingDependencies $commandHandlingDependencies

Return Value

ContentStreamId

Exceptions

ContentStreamDoesNotExistYet

protected void requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointNotFound

protected NodeType requireNodeType(NodeTypeName $nodeTypeName)

No description

Parameters

NodeTypeName $nodeTypeName

Return Value

NodeType

Exceptions

NodeTypeNotFound

protected void requireNodeTypeToNotBeAbstract(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

protected void requireNodeTypeToBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsNotOfTypeRoot

protected void requireNodeTypeToNotBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsOfTypeRoot

protected void requireRootNodeTypeToBeUnoccupied(ContentGraphInterface $contentGraph, NodeTypeName $nodeTypeName)

No description

Parameters

ContentGraphInterface $contentGraph
NodeTypeName $nodeTypeName

Return Value

void

protected void requireTetheredDescendantNodeTypesToExist(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeNotFound

protected void requireTetheredDescendantNodeTypesToNotBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsOfTypeRoot

protected void requireExistingDeclaredTetheredDescendantsToBeTethered(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeType $nodeType)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregate $nodeAggregate
NodeType $nodeType

Return Value

void

Exceptions

NodeAggregateIsUntethered

protected void requireNodeTypeToDeclareProperty(NodeTypeName $nodeTypeName, PropertyName $propertyName)

No description

Parameters

NodeTypeName $nodeTypeName
PropertyName $propertyName

Return Value

void

protected void requireNodeTypeToDeclareReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName)

No description

Parameters

NodeTypeName $nodeTypeName
ReferenceName $referenceName

Return Value

void

protected void requireNodeTypeNotToDeclareTetheredChildNodeName(NodeTypeName $nodeTypeName, NodeName $nodeName)

No description

Parameters

NodeTypeName $nodeTypeName
NodeName $nodeName

Return Value

void

protected void requireNodeTypeToAllowNodesOfTypeInReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName, NodeTypeName $nodeTypeNameInQuestion)

No description

Parameters

NodeTypeName $nodeTypeName
ReferenceName $referenceName
NodeTypeName $nodeTypeNameInQuestion

Return Value

void

protected void requireNodeTypeToAllowNumberOfReferencesInReference(SerializedNodeReferences $nodeReferences, NodeTypeName $nodeTypeName)

No description

Parameters

SerializedNodeReferences $nodeReferences
NodeTypeName $nodeTypeName

Return Value

void

protected void requireConstraintsImposedByAncestorsAreMet(ContentGraphInterface $contentGraph, NodeType $nodeType, array $parentNodeAggregateIds)

No description

Parameters

ContentGraphInterface $contentGraph
NodeType $nodeType
array $parentNodeAggregateIds

Return Value

void

Exceptions

NodeConstraintException

protected void requireNodeTypeConstraintsImposedByParentToBeMet(NodeType $parentsNodeType, NodeType $nodeType)

No description

Parameters

NodeType $parentsNodeType
NodeType $nodeType

Return Value

void

Exceptions

NodeTypeNotFound
NodeConstraintException

protected bool areNodeTypeConstraintsImposedByParentValid(NodeType $parentsNodeType, NodeType $nodeType)

No description

Parameters

NodeType $parentsNodeType
NodeType $nodeType

Return Value

bool

protected void requireNodeTypeConstraintsImposedByGrandparentToBeMet(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

Parameters

NodeType $grandParentsNodeType
NodeName|null $parentNodeName
NodeType $nodeType

Return Value

void

Exceptions

NodeConstraintException

protected bool areNodeTypeConstraintsImposedByGrandparentValid(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

Parameters

NodeType $grandParentsNodeType
NodeName|null $parentNodeName
NodeType $nodeType

Return Value

bool

protected NodeAggregate requireProjectedNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregateId $nodeAggregateId)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $nodeAggregateId

Return Value

NodeAggregate

Exceptions

NodeAggregateCurrentlyDoesNotExist

protected void requireProjectedNodeAggregateToNotExist(ContentGraphInterface $contentGraph, NodeAggregateId $nodeAggregateId)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $nodeAggregateId

Return Value

void

Exceptions

NodeAggregateCurrentlyExists

NodeAggregate requireProjectedParentNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $childNodeAggregateId
OriginDimensionSpacePoint $childOriginDimensionSpacePoint

Return Value

NodeAggregate

Exceptions

NodeAggregateCurrentlyDoesNotExist

protected void requireNodeAggregateToCoverDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint

protected void requireNodeAggregateToCoverDimensionSpacePoints(NodeAggregate $nodeAggregate, DimensionSpacePointSet $dimensionSpacePointSet)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePointSet $dimensionSpacePointSet

Return Value

void

Exceptions

NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet

protected void requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate, string|null $extraReason = '.')

No description

Parameters

NodeAggregate $nodeAggregate
string|null $extraReason

Return Value

void

Exceptions

NodeAggregateIsRoot

protected void requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggregate)

No description

Parameters

NodeAggregate $nodeAggregate

Return Value

void

Exceptions

NodeAggregateIsTethered

protected void requireNodeAggregateToNotBeDescendant(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregate $nodeAggregate
NodeAggregate $referenceNodeAggregate

Return Value

void

Exceptions

NodeAggregateIsDescendant

protected void requireNodeAggregateToBeSibling(ContentGraphInterface $contentGraph, NodeAggregateId $referenceNodeAggregateId, NodeAggregateId $siblingNodeAggregateId, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $referenceNodeAggregateId
NodeAggregateId $siblingNodeAggregateId
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateIsNoSibling

protected void requireNodeAggregateToBeChild(ContentGraphInterface $contentGraph, NodeAggregateId $childNodeAggregateId, NodeAggregateId $parentNodeAggregateId, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $childNodeAggregateId
NodeAggregateId $parentNodeAggregateId
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateIsNoChild

protected void requireNodeNameToBeUncovered(ContentGraphInterface $contentGraph, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $exclusivelyAllowedNodeAggregateId = null)

No description

Parameters

ContentGraphInterface $contentGraph
NodeName|null $nodeName
NodeAggregateId $parentNodeAggregateId
NodeAggregateId|null $exclusivelyAllowedNodeAggregateId

in some cases, aggregates of a given ID are allowed to cover this name. E.g. in the move case, if a node is moved (back) to its other variants, the name does not need to be reserved for future variants because the moved node already is that exact one

Return Value

void

Exceptions

NodeNameIsAlreadyCovered

protected void requireNodeAggregateToOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
OriginDimensionSpacePoint $originDimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointIsNotYetOccupied

protected void requireNodeAggregateToNotOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
OriginDimensionSpacePoint $originDimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointIsAlreadyOccupied

protected void validateReferenceProperties(ReferenceName $referenceName, PropertyValuesToWrite $referenceProperties, NodeTypeName $nodeTypeName)

No description

Parameters

ReferenceName $referenceName
PropertyValuesToWrite $referenceProperties
NodeTypeName $nodeTypeName

Return Value

void

protected ExpectedVersion getExpectedVersionOfContentStream(ContentStreamId $contentStreamId, CommandHandlingDependencies $commandHandlingDependencies)

No description

Parameters

ContentStreamId $contentStreamId
CommandHandlingDependencies $commandHandlingDependencies

Return Value

ExpectedVersion

protected void requireDescendantNodesToNotFallbackToDimensionSpacePointsOtherThan(NodeAggregateId $nodeAggregateId, ContentGraphInterface $contentGraph, DimensionSpacePointsWithAllowedSpecializations $fallbackConstraints)

No description

Parameters

NodeAggregateId $nodeAggregateId
ContentGraphInterface $contentGraph
DimensionSpacePointsWithAllowedSpecializations $fallbackConstraints

Return Value

void

PropertyConverter getPropertyConverter()

No description

Return Value

PropertyConverter

protected InterDimensionalVariationGraph getInterDimensionalVariationGraph()

No description

protected bool areAncestorNodeTypeConstraintChecksEnabled()

No description

Return Value

bool

EventsToPublish handleUntagSubtree(UntagSubtree $command, CommandHandlingDependencies $commandHandlingDependencies)

No description

Parameters

UntagSubtree $command
CommandHandlingDependencies $commandHandlingDependencies

Return Value

EventsToPublish

protected void requireNodeAggregateNotToBeTethered(NodeAggregate $nodeAggregate)

No description

Parameters

NodeAggregate $nodeAggregate

Return Value

void

protected Events createEventsForVariations(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate

Return Value

Events

protected Events handleCreateNodeSpecializationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate

Return Value

Events

protected array collectNodeSpecializationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $specializationVisibility
array $events

Return Value

array

protected Events handleCreateNodeGeneralizationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate

Return Value

Events

protected array collectNodeGeneralizationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $generalizationVisibility
array $events

Return Value

array

protected Events handleCreateNodePeerVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate

Return Value

Events

protected array collectNodePeerVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $peerVisibility
array $events

Return Value

array

protected Events createEventsForMissingTetheredNode(ContentGraphInterface $contentGraph, NodeAggregateId $parentNodeAggregateId, NodeTypeName $parentNodeTypeName, DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant, OriginDimensionSpacePoint $originDimensionSpacePoint, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, NodeAggregateId|null $tetheredNodeAggregateId)

This is the remediation action for non-existing tethered nodes.

It handles two cases:

  • there is no tethered node IN ANY DimensionSpacePoint -> we can simply create it
  • there is a tethered node already in some DimensionSpacePoint -> we need to specialize/generalize/... the other Tethered Node.

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $parentNodeAggregateId
NodeTypeName $parentNodeTypeName
DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant
OriginDimensionSpacePoint $originDimensionSpacePoint
TetheredNodeTypeDefinition $tetheredNodeTypeDefinition
NodeAggregateId|null $tetheredNodeAggregateId

Return Value

Events

Exceptions

Exception

protected array createEventsForMissingTetheredNodeAggregate(ContentGraphInterface $contentGraph, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints, CoverageByOrigin $coverageByOrigin, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $succeedingSiblingNodeAggregateId, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath)

No description

Parameters

ContentGraphInterface $contentGraph
TetheredNodeTypeDefinition $tetheredNodeTypeDefinition
OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints
CoverageByOrigin $coverageByOrigin
NodeAggregateId $parentNodeAggregateId
NodeAggregateId|null $succeedingSiblingNodeAggregateId
NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths
NodePath $currentNodePath

Return Value

array

protected Events createEventsForWronglyTypedNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeTypeName $newNodeTypeName, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath, NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy $conflictResolutionStrategy, NodeAggregateIds $alreadyRemovedNodeAggregateIds)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregate $nodeAggregate
NodeTypeName $newNodeTypeName
NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths
NodePath $currentNodePath
NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy $conflictResolutionStrategy
NodeAggregateIds $alreadyRemovedNodeAggregateIds

Return Value

Events

__construct(NodeTypeManager $nodeTypeManager, ContentDimensionZookeeper $contentDimensionZookeeper, InterDimensionalVariationGraph $interDimensionalVariationGraph, PropertyConverter $propertyConverter)

No description

Parameters

NodeTypeManager $nodeTypeManager
ContentDimensionZookeeper $contentDimensionZookeeper
InterDimensionalVariationGraph $interDimensionalVariationGraph
PropertyConverter $propertyConverter

bool canHandle(CommandInterface|RebasableToOtherWorkspaceInterface $command)

No description

Parameters

CommandInterface|RebasableToOtherWorkspaceInterface $command

Return Value

bool

EventsToPublish|Generator handle(CommandInterface|RebasableToOtherWorkspaceInterface $command, CommandHandlingDependencies $commandHandlingDependencies)

"simple" command handlers return EventsToPublish directly

For the case of the workspace command handler that need to publish to many streams and "close" the content-stream directly, it's allowed to yield the events to interact with the control flow of event publishing.

Parameters

CommandInterface|RebasableToOtherWorkspaceInterface $command
CommandHandlingDependencies $commandHandlingDependencies

Return Value

EventsToPublish|Generator

void withoutAncestorNodeTypeConstraintChecks(Closure $callback)

Use this closure to run code with the Ancestor Node Type Checks disabled; e.g.

during imports.

You can disable this because many old sites have this constraint violated more or less; and it's easy to fix later on; as it does not touch the fundamental integrity of the CR.

Parameters

Closure $callback

Return Value

void