[!!!][FEATURE] Streamline Fluid Styled Content and CSS Styled Content
[Packages/TYPO3.CMS.git] / typo3 / sysext / felogin / Configuration / TCA / Overrides / tt_content.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 call_user_func(function () {
5 // Add the FlexForm
6 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
7 '*',
8 'FILE:EXT:felogin/Configuration/FlexForms/Login.xml',
9 'login'
10 );
11
12 // check if there is already a forms tab and add the item after that, otherwise
13 // add the tab item as well
14 $additionalCTypeItem = [
15 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.I.10',
16 'login',
17 'content-elements-login'
18 ];
19
20 $existingCTypeItems = $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'];
21 $groupFound = false;
22 $groupPosition = false;
23 foreach ($existingCTypeItems as $position => $item) {
24 if ($item[0] === 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms') {
25 $groupFound = true;
26 $groupPosition = $position;
27 break;
28 }
29 }
30
31 if ($groupFound && $groupPosition) {
32 // add the new CType item below CType
33 array_splice($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'], $groupPosition, 0, [0 => $additionalCTypeItem]);
34 } else {
35 // nothing found, add two items (group + new CType) at the bottom of the list
36 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType',
37 ['LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:CType.div.forms', '--div--']
38 );
39 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', $additionalCTypeItem);
40 }
41
42 $GLOBALS['TCA']['tt_content']['types']['login']['showitem'] = '
43 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
44 --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
45 --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.headers;headers,
46 pi_flexform,
47 --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
48 --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
49 --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
50 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
51 --palette--;;language,
52 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
53 --palette--;;hidden,
54 --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
55 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:categories,
56 categories,
57 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:notes,
58 rowDescription,
59 --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:extended,
60 ';
61 });