<?php
defined('TYPO3') || die();


/***************
 * Add content element to selector list
 */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
    'tt_content',
    'CType',
    [
        'LLL:EXT:stwm_sitepackage/Resources/Private/Language/locallang_db.xlf:amdsbear_menucard.wizard.title',
        'amdsbear_menucard',
        'tx_amdsbear_menucard'
    ],
    'menu_sitemap_pages',
    'after'
);


/***************
 * Assign Icon
 */

$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['amdsbear_menucard'] = 'tx_stwm_menucard';


/***************
 * Register fields
 */

$tempColumns = [

];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $tempColumns);


$GLOBALS['TCA']['tt_content']['types'] += [
    'amdsbear_menucard' =>
        [
            'columnsOverrides' =>
                [
                    'bodytext' =>
                        [
                            'config' =>
                                [
                                    'richtextConfiguration' => 'default',
                                    'enableRichtext' => 1,
                                ],
                        ],
                ],
            'showitem' => '
			--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
			--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,header,header_layout,subheader,bodytext,pages,
			--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
			--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
			--palette--;;language,
			--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
			--palette--;;language,
			--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
			--palette--;;hidden,
			--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
			--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
			--div--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category,categories,		
			--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,tx_gridelements_container,tx_gridelements_columns, 
			--div--;LLL:EXT:gridelements/Resources/Private/Language/locallang_db.xlf:gridElements',
        ],
];

