final class PropertyValuesToWrite (View source)

Property values to write, supports arbitrary objects. Will be then converted to {SerializedPropertyValues} inside the events and persisted commands.

This object does not store the types of the values separately, while in {\Neos\ContentRepository\Core\Feature\NodeModification\Dto\SerializedPropertyValues}, the types are stored in the data structure. We expect the value types to match the NodeType's property types (this is validated in the command handler).

A null value will cause to unset a nodes' property.

Methods

createEmpty()

No description

fromArray(array $values)

No description

fromJsonString(string $jsonString)

No description

withValue(string $valueName, mixed $value)

Adds a property value to write.

bool
isEmpty()

No description

Details

static PropertyValuesToWrite createEmpty()

No description

Return Value

PropertyValuesToWrite

static PropertyValuesToWrite fromArray(array $values)

No description

Parameters

array $values

Return Value

PropertyValuesToWrite

static PropertyValuesToWrite fromJsonString(string $jsonString)

No description

Parameters

string $jsonString

Return Value

PropertyValuesToWrite

PropertyValuesToWrite withValue(string $valueName, mixed $value)

Adds a property value to write.

To declare to unset a property, null is used:

$propertyValues->withValue('my-property', null);

Parameters

string $valueName
mixed $value

Return Value

PropertyValuesToWrite

PropertyValuesToWrite merge(PropertyValuesToWrite $other)

No description

Parameters

PropertyValuesToWrite $other

Return Value

PropertyValuesToWrite

PropertyValuesToWrite withoutUnsets()

internal  you should not need this in user-land
 

No description

Return Value

PropertyValuesToWrite

PropertyNames getPropertiesToUnset()

internal  you should not need this in user-land
 

No description

Return Value

PropertyNames

bool isEmpty()

No description

Return Value

bool