<?php
defined('TYPO3') or die('Access denied.');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
    'tt_content',
    [
        'table_responsivewrap' => [
            'exclude' => true,
            'label' => 'Responsive',
            'config' => [
                'type' => 'check',
                'renderType' => 'checkboxToggle',
                'default' => 1,
                'items' => [
                    [
                        0 => '',
                        1 => '',
                    ]
                ],
            ]
        ]
    ]
);

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
    'tt_content',
    'tablelayout',
    'table_responsivewrap',
    'after:table_tfoot'
);

//https://www.in2code.de/aktuelles/typo3-tt-contentlayout-und-frame-class-optionen-dynamisch-setzen/
$GLOBALS['TCA']['tt_content']['columns']['layout']['config']['itemsProcFunc']
    = \AmadeusAgentur\SeragWiessner\Tca\TtContentLayoutOptions::class . '->addOptions';
