[TASK] Move DB functionality pages.storage_pid to compatibility6
[Packages/TYPO3.CMS.git] / typo3 / sysext / compatibility6 / Configuration / TCA / Overrides / pages.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add "pages.storage_pid" field to TCA column
5 $additionalColumns = array(
6 'storage_pid' => array(
7 'exclude' => 1,
8 'label' => 'LLL:EXT:lang/locallang_tca.xlf:storage_pid',
9 'config' => array(
10 'type' => 'group',
11 'internal_type' => 'db',
12 'allowed' => 'pages',
13 'size' => '1',
14 'maxitems' => '1',
15 'minitems' => '0',
16 'show_thumbs' => '1',
17 'wizards' => array(
18 'suggest' => array(
19 'type' => 'suggest'
20 )
21 )
22 )
23 )
24 );
25 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $additionalColumns);
26
27 // Add palette
28 $GLOBALS['TCA']['pages']['palettes']['storage'] = array(
29 'showitem' => 'storage_pid;LLL:EXT:cms/locallang_tca.xlf:pages.storage_pid_formlabel',
30 'canNotCollapse' => 1
31 );
32
33 // Add to "normal" pages, "external URL", "shortcut page" and "storage PID"
34 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages',
35 '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.storage;storage',
36 \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_DEFAULT . ','
37 . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_LINK . ','
38 . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SHORTCUT . ','
39 . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER,
40 'after:media'
41 );