invertStateDisplay

invertStateDisplay
Type:boolean
Scope:Display
Default:false

The state of a checkbox can be displayed inverted when this property is set to true.

Example

Toggle checkbox with invertStateDisplay

../../../../_images/Checkbox18.png
'columns' => [
    'checkbox_18' => [
        'exclude' => 1,
        'label' => 'checkbox_18',
        'description' => 'renderType=checkboxToggle single inverted state display',
        'config' => [
            'type' => 'check',
            'renderType' => 'checkboxToggle',
            'items' => [
                [
                    0 => 'foo',
                    1 => '',
                    'labelChecked' => 'Enabled',
                    'labelUnchecked' => 'Disabled',
                    'invertStateDisplay' => true,
                ],
            ],
        ],
    ],
]

Field hidden/visible in table tt_content

The field hidden is set to 1 if the record is hidden and to 0 if the record is visibile. However the field usually carries a label like Enabled. It is then displayed as “on”, when the underlying field is set to 0. The following examples is from the core, table tt_content:

'columns' => [
    'hidden' => [
        'exclude' => true,
        'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
        'config' => [
            'type' => 'check',
            'renderType' => 'checkboxToggle',
            'items' => [
                [
                    0 => '',
                    1 => '',
                    'invertStateDisplay' => true,
                ],
            ],
        ],
    ],
]