Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
   eZ Publish 4.x / legacy

eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

This field type represents a relation to a content item.

NameInternal nameExpected input

Table of contents:


This FieldType makes possible to store and retrieve the value of relation to a content item.

Input expectations

integer 150

Value object


The Value class of this field type contains the following properties:

$destinationContentIdstring|int|nullThis property will be used to store the value provided, which will represent the related content.
Value object content example


The Relation\Value constructor will initialize a new Value object with the value provided. It expects a mixed value

Constructor example


This FieldType validates the provided relation exists, but before it does that it will check that the value is either string or int.


The field definition of this FieldType can be configured with two or three options:

NameTypeDefault valueDescription
selectionMethodintself::SELECTION_BROWSEThis setting defines the selection method. It expects an integer (0/1). 0 stands for self::SELECTION_BROWSE, 1 stands for self::SELECTION_DROPDOWN.
selectionRootstringnullThis setting defines the selection root.



array[]An array of ContentType ids that are allowed for related Content
Relation FieldType example settings

Note: These settings are meant for future use in user interface when allowing users to select relations.