final class NodeReferenceToWrite (View source)

A single node references to write

Simple: Just a node aggregate id as target {\Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\fromTarget}

With properties: Additionally to the target also properties can be specified to be set on the references by using {\Neos\ContentRepository\Core\Feature\NodeModification\Dto\PropertyValuesToWrite} in {\Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\fromTargetAndProperties}. We expect the value types to match the configured types of the NodeType

Will be converted to {\Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\SerializedNodeReferences} inside the events and persisted commands.

Methods

fromTarget(NodeAggregateId $target)

The node aggregate id as target of the reference to write

Details

static NodeReferenceToWrite fromTarget(NodeAggregateId $target)

The node aggregate id as target of the reference to write

To set a collection of node aggregate ids as targets see {\Neos\ContentRepository\Core\Feature\NodeReferencing\Dto\NodeReferencesForName::fromTargets()} as utility

Parameters

NodeAggregateId $target

Return Value

NodeReferenceToWrite

static NodeReferenceToWrite fromTargetAndProperties(NodeAggregateId $target, PropertyValuesToWrite $properties)

No description

Parameters

NodeAggregateId $target
PropertyValuesToWrite $properties

Return Value

NodeReferenceToWrite