MM

MM
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 a MM relation. It is used together with allowed (group). If you use Extbase foreign_table has to contain the same table name additionally.

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.

The table name used in the field MM should be unique. It must be a valid SQL table name. It is best practise to use the name of both referenced tables and of the field in which the reference is saved on local side. This way uniqueness can be ensured and it is possible to find the field where the table is used quickly.

Example:

// table tx_table1
$fields = [
   'relation_table1_table2' => [
        'exclude' => 1,
        'label' => 'Project manager',
        'config' => [
            'type' => 'group',
            'allowed' => 'tx_table1',
            'foreign_table' => 'tx_table2', // needed by Extbase
            'MM' => 'table1_table2_relationtable1table2',
        ],
    ],
 ];