General

  eZ Systems Website
  Technical documentation
  Editor documentation

This Documentation contains:
 
Technical documentation:



⚠ WARNING ! This documentation is deprecated !

Please go to the current Technical Documentation

Skip to end of metadata
Go to start of metadata

This Field Type represents a relation to a Content item.

NameInternal nameExpected input
Relationezobjectrelationmixed

Table of contents:

Description

This Field Type makes it possible to store and retrieve the value of relation to a Content item.

Input expectations

TypeExample
string
"150"
integer 150

Value object

Properties

The Value class of this Field Type contains the following properties:

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

Constructor

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

Constructor example

Validation

This Field Type validates whether 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 Field Type can be configured with two 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.
Relation FieldType example settings

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