ActiveRelation

final readonly class \TYPO3\CMS\Core\Schema\ActiveRelation

A relation to another field / schema.

An example:

  • A field "authors" in table "books" has an active relation to the field "written_books" in table "tx_myextension_author"
  • A field "assets" in table "tt_content" has an active relation TO "sys_file_reference.uid".

For relations stored in an intermediate table (TCA "MM"), toTable() is the schema the relation finally points to, while manyToManyTable() is the intermediate table holding the relation rows.

Table of Contents

Methods

__construct()  : mixed
__set_state()  : self
isManyToMany()  : bool
manyToManyTable()  : string|null
toField()  : string|null
toTable()  : string

Methods

__construct()

public __construct(string $toTable, string|null $toField[, string|null $manyToManyTable = null ]) : mixed

Parameters

$toTable : string
$toField : string|null
$manyToManyTable : string|null = null

__set_state()

public static __set_state(array $state) : self

Parameters

$state : array

Return values

self

isManyToMany()

public isManyToMany() : bool

Return values

bool

manyToManyTable()

public manyToManyTable() : string|null

Return values

string|null

toField()

public toField() : string|null

Return values

string|null

toTable()

public toTable() : string

Return values

string
On this page