Class

eZ\Publish\Core\REST\Client\Values\Content\ContentUpdateStruct

class ContentUpdateStruct extends ContentUpdateStruct

Implementation of the {@link \eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct} class.

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, bool|string $languageCode = null)

Adds a field to the field collection.

Details

at line 38
public setField(string $fieldDefIdentifier, mixed $value, bool|string $languageCode = null)

Adds a field to the field collection.

This method could also be implemented by ArrayAccess 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 field type or an instance of a Value class provided by the field type
bool|string $languageCode If not given on a translatable field the initial language is used,