[TASK] Finalize for publication
[TYPO3CMS/Extensions/expressions_sandbox.git] / ext_tables.php
1 <?php
2 if (!defined ('TYPO3_MODE')) {
3 die ('Access denied.');
4 }
5
6 // Hide some default fields
7 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1'] = 'layout,select_key,pages';
8
9 // Add pi1 to the list of plugins
10 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
11 array(
12 'LLL:EXT:expressions_sandbox/locallang_db.xml:tt_content.list_type_pi1',
13 $_EXTKEY . '_pi1',
14 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'ext_icon.png'
15 ),
16 'list_type'
17 );
18 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
19 'Cobweb.ExpressionsSandbox',
20 'setup', '
21 plugin.tx_expressionssandbox_pi1 = USER_INT
22 plugin.tx_expressionssandbox_pi1.userFunc = Cobweb\\ExpressionsSandbox\\Controller\\SandboxController->main
23 '
24 );
25
26 // Activate the display of the plug-in flexform field and set FlexForm definition
27 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
28 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
29 $_EXTKEY . '_pi1',
30 'FILE:EXT:expressions_sandbox/flexform_ds.xml'
31 );