Class

eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct

abstract class ContentUpdateStruct extends ContentStruct

This class is used for updating the fields of a content object draft.

Properties

Field[] $fields \eZ\Publish\API\Repository\Values\Content\Field[]$fields
string $initialLanguageCode The language code of the version.
mixed $creatorId Creator user ID.

Methods

setField(string $fieldDefIdentifier, mixed $value, string|null $language = null)

Adds a field to the field collection.

from ContentStruct

Details

in ContentStruct at line 31
abstract public setField(string $fieldDefIdentifier, mixed $value, string|null $language = null)

Adds a field to the field collection.

This method could also be implemented by a magic setter so that $fields[$fieldDefIdentifier][$language] = $value or without language $fields[$fieldDefIdentifier] = $value is an equivalent call.

Parameters

string $fieldDefIdentifier the identifier of the field definition
mixed $value Either a plain value which is understandable by the corresponding field type or an instance of a Value class provided by the field type
string|null $language If not given on a translatable field the initial language is used