Copied!

Relation

Relation.php : 22
Abstract
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 mixed ASSET = 16
Tags
Deprecated
5.0.0

const is deprecated and will be removed in 6.0.0. Use RelationType::ASSET instead.

publicCOMMON

Relation.php : 29

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

public mixed COMMON = 1
Tags
Deprecated
5.0.0

const is deprecated and will be removed in 6.0.0. Use RelationType::COMMON instead.

publicEMBED

Relation.php : 36

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

public mixed EMBED = 2
Tags
Deprecated
5.0.0

const is deprecated and will be removed in 6.0.0. Use RelationType::EMBED instead.

publicFIELD

Relation.php : 50

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

public mixed FIELD = 8
Tags
Deprecated
5.0.0

const is deprecated and will be removed in 6.0.0. Use RelationType::FIELD instead.

Relation.php : 43

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

public mixed LINK = 4
Tags
Deprecated
5.0.0

const is deprecated and will be removed in 6.0.0. Use RelationType::LINK instead.

Properties

public $destinationContentInfo read-only

Relation.php
public ContentInfo $destinationContentInfo

Calls Relation::getDestinationContentInfo()

public $sourceContentInfo read-only

Relation.php
public ContentInfo $sourceContentInfo

Calls Relation::getSourceContentInfo()

protected $id

Relation.php : 62

ID of the relation.

protected int $id

protected $sourceFieldDefinitionIdentifier

Relation.php : 69

Source content type Field Definition identifier.

protected string|null $sourceFieldDefinitionIdentifier = null

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

protected $type

Relation.php : 80

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 : 32

Construct object optionally with a set of properties.

public __construct([array<string, mixed> $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> [] -

publicgetDestinationContentInfo()

Relation.php : 94

the content of the destination content of the relation.

public abstract getDestinationContentInfo() : ContentInfo

Return values

ContentInfo

publicgetSourceContentInfo()

Relation.php : 87

the content of the source content of the relation.

public abstract getSourceContentInfo() : ContentInfo

Return values

ContentInfo

protectedgetProperties()

ValueObject.php : 53

Returns list of available properties' names.

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

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>

Attributes
#[Ignore]