multiSelectFilterItems

multiSelectFilterItems
Path

$GLOBALS['TCA'][$table]['columns'][$field]['config']

type

array

Scope

Display

RenderType

selectMultipleSideBySide

Contains predefined elements for the filter field. On selecting an item, the list of available items gets automatically filtered.

Each element in this array is in itself an array where:

  • First value is the filter value of the item .
  • Second value is the item label (string or LLL reference)

Examples

Select by predefined keywords

EXT:styleguide/Configuration/TCA/tx_styleguide_elements_select.php
[
    'columns' => [
        'select_multiplesidebyside_5' => [
            'exclude' => 1,
            'label' => 'select_multiplesidebyside_5 multiSelectFilterItems',
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'items' => [
                    [
                        'foo 1',
                        1,
                    ],
                    [
                        'foo 2',
                        2,
                    ],
                    [
                        'foo 3',
                        3,
                    ],
                    [
                        'bar',
                        4,
                    ],
                ],
                'multiSelectFilterItems' => [
                    [
                        '',
                        '',
                    ],
                    [
                        'foo',
                        'foo',
                    ],
                    [
                        'bar',
                        'bar',
                    ],
                ],
            ],
        ],
    ],
]
Copied!