Base struct for content create/update structs.
Properties¶
$fields
¶
|
|
|
Methods¶
__construct()
¶
Construct object optionally with a set of properties.
|
|
|
Readonly properties values must be set using $properties as they aren't writable anymore
after object has been created.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $properties | array<string, mixed> | [] | - |
setField()
¶
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
| Name | Type | Default value | Description |
|---|---|---|---|
| $fieldDefIdentifier | string | - |
the identifier of the field definition |
| $value | mixed | - |
Either a plain value which is understandable by the corresponding field type or an instance of a Value class provided by the field type |
| $language | string|null | null |
If not given on a translatable field the initial language is used |
getProperties()
¶
Returns list of available properties' names.
|
|
|
Override to add dynamic properties.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $dynamicProperties | array<int, string> | [] |
Additional dynamic properties exposed on the object |
Return values
array<int, string>