This field type represents a relation to a content item.
Name | Internal name | Expected input |
---|---|---|
Relation | ezobjectrelation | mixed |
Table of contents:
Description
This FieldType makes possible to store and retrieve the value of relation to a content item.
Input expectations
Type | Example |
---|---|
string | "150" |
integer | 150 |
Value object
Properties
The Value class of this field type contains the following properties:
Property | Type | Description |
---|---|---|
$destinationContentId | string|int|null | This property will be used to store the value provided, which will represent the related content. |
Constructor
The Relation
\Value
constructor will initialize a new Value object with the value provided. It expects a mixed value
Validation
This FieldType validates the provided relation exists, but before it does that it will check that the value is either string or int.
Settings
The field definition of this FieldType can be configured with two options:
Name | Type | Default value | Description |
---|---|---|---|
selectionMethod | int | self::SELECTION_BROWSE | This setting defines the selection method. It expects an integer (0/1). 0 stands for self::SELECTION_BROWSE , 1 stands for self::SELECTION_DROPDOWN . |
selectionRoot | string | null | This setting defines the selection root. |
Note: These settings are meant for future use in user interface when allowing users to select relations.