Examples

Example: Single checkbox with toggle

../../../../_images/Checkbox17.png
'columns' => [
    'checkbox_17' => [
        'exclude' => 1,
        'label' => 'checkbox_17',
        'description' => 'renderType=checkboxToggle single',
        'config' => [
            'type' => 'check',
            'renderType' => 'checkboxToggle',
            'items' => [
                [
                    0 => 'foo',
                    1 => '',
                    'labelChecked' => 'Enabled',
                    'labelUnchecked' => 'Disabled',
                ],
            ],
        ],
    ],
]

checkboxToggle: Instead of checkboxes, a toggle item is displayed.

Example: Single checkbox with toggle inverted state display

../../../../_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,
                ],
            ],
        ],
    ],
]

invertedStateDisplay: A checkbox is marked checked if the database bit is not set and vice versa.