MM¶
- MM (type => inline)¶
- Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- Type
string (table name)
- Scope
Proc.
This value contains the name of the table in which to store an MM relation. It is used together with foreign_table. The database field with a MM property only stores the number of records in the relation.
There is additional information in the MM common property description.
Warning
Copying with MM relations will not create a copy of the value. Thus copying the record
Org
withOrg->orgA
andOrg->orgB
asNew
results inNew->orgA
andNew->orgB
instead ofNew->newA
andNew->newB
. Deleting the relationNew->orgA
will result in a broken relationOrg->orgA
.
- MM_hasUidField (type => inline)¶
- Type
boolean
- Scope
Proc.
If the "multiple" feature is used with MM relations you must set this value to true. Otherwise sorting and removing relations will be buggy.
- MM_opposite_field (type => inline)¶
- Type
string (field name)
- Scope
Proc.
If you want to make a MM relation editable from the foreign side (bidirectional) of the relation as well, you need to set
MM_opposite_field
on the foreign side to the field name on the local side.For example if the field "companies.employees" is your local side and you want to make the same relation editable from the foreign side of the relation in a field called persons.employers, you would need to set the
MM_opposite_field
value of the TCA configuration of the persons.employers field to the string "employees".Note
Bidirectional references only get registered once on the native side in
sys_refindex
.
Examples¶
Inline field with MM table configured¶

[
'columns' => [
'inline_1' => [
'label' => 'inline_1',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_styleguide_inline_mm_child',
'MM' => 'tx_styleguide_inline_mm_child_rel',
'MM_hasUidField' => true,
'appearance' => [
'showSynchronizationLink' => 1,
'showAllLocalizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
],
],
],
],
]
Opposite field to display MM relations two ways¶

[
'columns' => [
'parents' => [
'label' => 'parents',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_styleguide_inline_mm',
'MM' => 'tx_styleguide_inline_mm_child_rel',
'MM_hasUidField' => true,
'MM_opposite_field' => 'inline_1',
'maxitems' => 10,
'appearance' => [
'showSynchronizationLink' => 1,
'showAllLocalizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
],
],
],
],
]