Commit 599aaa24 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Use strings instead of variables for TCA configuration

parent 979646fe
......@@ -24,12 +24,7 @@
* This copyright notice MUST APPEAR in all copies of the script!
*/
call_user_func(
function ($extKey, $table) {
// add static typoscript template
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extKey, 'Configuration/TypoScript/', $extKey
);
}, 'df_tabs', 'sys_template'
// add static typoscript template
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'df_tabs', 'Configuration/TypoScript/', 'df_tabs'
);
......@@ -24,28 +24,23 @@
* This copyright notice MUST APPEAR in all copies of the script!
*/
call_user_func(
function ($extKey, $table) {
// add plugin
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:df_tabs/Resources/Private/Language/locallang.xlf:tt_content.list_type_plugin1',
$extKey . '_plugin1',
'EXT:' . $extKey . '/Resources/Public/Images/contentElementWizard.png'
],
'list_type',
$extKey
);
// add plugin
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:df_tabs/Resources/Private/Language/locallang.xlf:tt_content.list_type_plugin1',
'df_tabs_plugin1',
'EXT:df_tabs/Resources/Public/Images/contentElementWizard.png'
],
'list_type',
'df_tabs'
);
// remove default plugin fields
$list = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['df_tabs_plugin1'] = $list;
// remove default plugin fields
$list = 'select_key,pages,recursive';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['df_tabs_plugin1'] = $list;
// add flexform configuration
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist']['df_tabs_plugin1'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'df_tabs_plugin1', 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/flexform.xml'
);
}, 'df_tabs', 'tt_content'
// add flexform configuration
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['df_tabs_plugin1'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'df_tabs_plugin1', 'FILE:EXT:df_tabs/Configuration/FlexForms/flexform.xml'
);
......@@ -26,9 +26,9 @@
*/
call_user_func(
function ($extKey) {
function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43(
$extKey, '', '_plugin1', 'list_type', TRUE
'df_tabs', '', '_plugin1', 'list_type', TRUE
);
// we correct the classname of the plugin controller
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
......@@ -40,7 +40,7 @@ call_user_func(
= \SGalinski\DfTabs\Hooks\PageLayoutView\PluginRenderer::class;
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'@import "EXT:' . $extKey . '/Configuration/TsConfig/Page/NewContentElementWizard.tsconfig"'
'@import "EXT:df_tabs/Configuration/TsConfig/Page/NewContentElementWizard.tsconfig"'
);
/**
......@@ -50,10 +50,10 @@ call_user_func(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
$iconRegistry->registerIcon(
'extension-' . $extKey . '-content-element',
'extension-df_tabs-content-element',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:' . $extKey . '/Resources/Public/Images/contentElementWizard.png']
['source' => 'EXT:df_tabs/Resources/Public/Images/contentElementWizard.png']
);
}, 'df_tabs'
}
);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment