Copied!

Relation

Relation.php : 22
Extends ValueObject

Class representing a relation between content.

Constants

publicASSET

Relation.php : 57

the relation type ASSET is set for a relation to asset in an attribute value.

public int ASSET = 16

publicCOMMON

Relation.php : 29

The relation type COMMON is a general relation between object set by a user.

public int COMMON = 1

publicEMBED

Relation.php : 36

the relation type EMBED is set for a relation which is anchored as embedded link in an attribute value.

public int EMBED = 2

publicFIELD

Relation.php : 50

the relation type FIELD is set for a relation which is part of an relation attribute value.

public int FIELD = 8
Relation.php : 43

the relation type LINK is set for a relation which is anchored as link in an attribute value.

public int LINK = 4

Properties

public $destinationContentInfo read-only

Relation.php
public ContentInfo $destinationContentInfo

Calls Relation::getDestinationContentInfo()

public $id read-only

Relation.php
public mixed $id

the internal id of the relation

public $sourceContentInfo read-only

Relation.php
public ContentInfo $sourceContentInfo

Calls Relation::getSourceContentInfo()

public $sourceFieldDefinitionIdentifier read-only

Relation.php
public string $sourceFieldDefinitionIdentifier

the field definition identifier of the field where this relation is anchored if the relation is of type EMBED, LINK, or ATTRIBUTE

public $type read-only

Relation.php
public int $type

The relation type bitmask containing one or more of Relation::COMMON, Relation::EMBED, Relation::LINK, Relation::FIELD

protected $id

Relation.php : 64

Id of the relation.

protected mixed $id

protected $sourceFieldDefinitionIdentifier

Relation.php : 73

Source content type Field Definition Id.

protected string $sourceFieldDefinitionIdentifier

For relation not of type RelationType::COMMON this field denotes the field definition id of the attribute where the relation is anchored.

protected $type

Relation.php : 100

The relation type bitmask.

protected int $type
Tags
See
Relation::COMMON
See
Relation::EMBED
See
Relation::LINK
See
Relation::FIELD
See
Relation::ASSET

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$properties array<string|int, mixed> [] -

publicgetDestinationContentInfo()

Relation.php : 87

the content of the destination content of the relation.

public abstract getDestinationContentInfo() : ContentInfo

Return values

ContentInfo

publicgetSourceContentInfo()

Relation.php : 80

the content of the source content of the relation.

public abstract getSourceContentInfo() : ContentInfo

Return values

ContentInfo

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>