Skip to content
Snippets Groups Projects
Commit 0647e01e authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Use strings instead of variables for TCA configuration

parent 75c3db29
No related branches found
Tags 5.2.7
No related merge requests found
...@@ -24,404 +24,394 @@ ...@@ -24,404 +24,394 @@
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
call_user_func( $localLangDbPath = 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:';
function ($extKey, $table) { $localLangBackendPath = 'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:';
$localLangDbPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:'; foreach (
$localLangBackendPath = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:'; [
foreach ( \SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE => [
[ 'icon' => 'EXT:sg_news/Resources/Public/Images/Category.png',
\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE => [ 'locallangIndex' => 'pageType.category'
'icon' => 'EXT:sg_news/Resources/Public/Images/Category.png', ],
'locallangIndex' => 'pageType.category' \SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE => [
], 'icon' => 'EXT:sg_news/Resources/Public/Images/News.png',
\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE => [ 'locallangIndex' => 'pageType.news'
'icon' => 'EXT:sg_news/Resources/Public/Images/News.png', ]
'locallangIndex' => 'pageType.news' ] as $doktype => $configuration) {
]
] as $doktype => $configuration) {
// add the new doktype to the page type selector
$GLOBALS['TCA'][$table]['columns']['doktype']['config']['items'][] = [
$localLangBackendPath . $configuration['locallangIndex'],
$doktype,
$configuration['icon']
];
// also add the new doktype to the page language overlays type selector (so that translations can inherit the same type) // add the new doktype to the page type selector
$GLOBALS['TCA']['' . $table . '_language_overlay']['columns']['doktype']['config']['items'][] = [ $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'][] = [
$localLangBackendPath . $configuration['locallangIndex'], $localLangBackendPath . $configuration['locallangIndex'],
$doktype, $doktype,
$configuration['icon'] $configuration['icon']
]; ];
$GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$doktype] = 'tcarecords-' . $table . '-' . $doktype; $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'][$doktype] = 'tcarecords-pages-' . $doktype;
// add the new doktype to the list of page types // add the new doktype to the list of page types
$GLOBALS['PAGES_TYPES'][$doktype] = [ $GLOBALS['PAGES_TYPES'][$doktype] = [
'type' => 'sys', 'type' => 'sys',
'icon' => $configuration['icon'], 'icon' => $configuration['icon'],
'allowedTables' => '*', 'allowedTables' => '*',
]; ];
} }
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE] = [ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE] = [
'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, 'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;;standard, --palette--;;standard,
--palette--;;titleDescriptionAndHighlightFlag, --palette--;;titleDescriptionAndHighlightFlag,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.editorial;editorialWithNewsAuthor, --palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.palettes.editorial;editorialWithNewsAuthor,
tx_sgnews_content_from_another_page, tx_sgnews_related_news, tx_sgnews_tags, tx_sgnews_content_from_another_page, tx_sgnews_related_news, tx_sgnews_tags,
--div--;' . $localLangDbPath . $table . '.tabs.images, --div--;' . $localLangDbPath . 'pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image, tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.metadata, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
tx_projectbase_devnullrobots_flags, tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.abstract;abstract, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.appearance, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.layout;layout, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.visibility;visibility, --palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.access;access, --palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.behaviour, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.caching;caching, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.miscellaneous;miscellaneous, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language --palette--;;language
' '
]; ];
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE] = [ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::CATEGORY_DOKTYPE] = [
'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, 'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;;standard, --palette--;;standard,
title, slug, tx_projectbase_path_segment, tx_projectbase_excludefromsluggeneration, tx_realurl_pathsegment, tx_realurl_exclude, title, slug, tx_projectbase_path_segment, tx_projectbase_excludefromsluggeneration, tx_realurl_pathsegment, tx_realurl_exclude,
--div--;' . $localLangDbPath . $table . '.tabs.images, --div--;' . $localLangDbPath . 'pages.tabs.images,
tx_sgnews_teaser2_image, tx_sgnews_teaser1_image, tx_sgnews_teaser2_image, tx_sgnews_teaser1_image,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.metadata, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.metadata,
tx_projectbase_devnullrobots_flags, tx_projectbase_devnullrobots_flags,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.abstract;abstract, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.abstract;abstract,
tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description, tx_projectbase_seo_titletag,tx_projectbase_seo_canonicaltag, description,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.appearance, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.layout;layout, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.layout;layout,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.visibility;visibility, --palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.access;access, --palette--;LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.tabs.behaviour, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.tabs.behaviour,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.caching;caching, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.caching;caching,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.palettes.miscellaneous;miscellaneous, --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language, --div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
--palette--;;language --palette--;;language
' '
]; ];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
$table, [ 'pages',
'tx_sgnews_teaser1_image' => [ [
'exclude' => TRUE, 'tx_sgnews_teaser1_image' => [
'label' => $localLangDbPath . $table . '.tx_sgnews_teaser1_image', 'exclude' => TRUE,
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'label' => $localLangDbPath . 'pages.tx_sgnews_teaser1_image',
'tx_sgnews_teaser1_image', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
[ 'tx_sgnews_teaser1_image',
'maxitems' => 9999, [
'foreign_types' => [ 'maxitems' => 9999,
'0' => [ 'foreign_types' => [
'showitem' => ' '0' => [
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, 'showitem' => '
--palette--;;filePalette' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
], --palette--;;filePalette'
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
], ],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
), 'showitem' => '
], --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
'tx_sgnews_teaser2_image' => [ --palette--;;filePalette'
'exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_teaser2_image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_sgnews_teaser2_image',
[
'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
]
],
'appearance' => [
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'showAllLocalizationLink' => TRUE,
],
], ],
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
), 'showitem' => '
], --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
'tx_sgnews_news_author' => [ --palette--;;filePalette'
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_news_author',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'tx_sgnews_domain_model_author',
'minitems' => 0,
'maxitems' => 9,
'items' => [
['', ''],
], ],
'fieldControl' => [ \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'addRecord' => [ 'showitem' => '
'disabled' => FALSE, --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
], --palette--;;filePalette'
], ],
], \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
], 'showitem' => '
'tx_sgnews_content_from_another_page' => [ --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
'exclude' => TRUE, --palette--;;filePalette'
'l10n_exclude' => TRUE, ],
'label' => $localLangDbPath . $table . '.tx_sgnews_content_from_another_page', \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'config' => [ 'showitem' => '
'type' => 'group', --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
'internal_type' => 'db', --palette--;;filePalette'
'allowed' => 'pages',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'items' => [
['', ''],
] ]
], ],
], 'appearance' => [
'tx_sgnews_related_news' => [ 'showPossibleLocalizationRecords' => TRUE,
'exclude' => TRUE, 'showRemovedLocalizationRecords' => TRUE,
'l10n_exclude' => TRUE, 'showSynchronizationLink' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_related_news', 'showAllLocalizationLink' => TRUE,
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => $table,
'size' => 5,
'minitems' => 0,
'maxitems' => 99
], ],
], ],
'tx_sgnews_highlighted' => [ $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
'displayCond' => 'FIELD:tx_sgnews_never_highlighted:=:0', ),
'onChange' => 'reload', ],
'exclude' => TRUE, 'tx_sgnews_teaser2_image' => [
'l10n_exclude' => TRUE, 'exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_highlighted', 'label' => $localLangDbPath . 'pages.tx_sgnews_teaser2_image',
'config' => [ 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'type' => 'check', 'tx_sgnews_teaser2_image',
'behaviour' => [ [
'allowLanguageSynchronization' => TRUE 'maxitems' => 9999,
'foreign_types' => [
'0' => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
],
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
'showitem' => '
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
--palette--;;filePalette'
] ]
], ],
], 'appearance' => [
'tx_sgnews_never_highlighted' => [ 'showPossibleLocalizationRecords' => TRUE,
'displayCond' => 'FIELD:tx_sgnews_highlighted:=:0', 'showRemovedLocalizationRecords' => TRUE,
'onChange' => 'reload', 'showSynchronizationLink' => TRUE,
'exclude' => TRUE, 'showAllLocalizationLink' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . $table . '.tx_sgnews_never_highlighted',
'config' => [
'type' => 'check',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
], ],
], ],
'tx_sgnews_tags' => [ $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
'exclude' => 1, ),
'label' => $localLangDbPath . $table . '.tx_sgnews_tags', ],
'config' => [ 'tx_sgnews_news_author' => [
'type' => 'select', 'exclude' => TRUE,
'maxitems' => 9999, 'l10n_exclude' => TRUE,
'size' => 10, 'label' => $localLangDbPath . 'pages.tx_sgnews_news_author',
'foreign_table' => 'sys_category', 'config' => [
'foreign_table_where' => 'AND (IF (###PAGE_TSCONFIG_ID### = 0, 1, sys_category.pid = ###PAGE_TSCONFIG_ID###)) AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC', 'type' => 'group',
'MM' => 'sys_category_record_mm', 'internal_type' => 'db',
'MM_match_fields' => [ 'allowed' => 'tx_sgnews_domain_model_author',
'fieldname' => 'tx_sgnews_tags', 'minitems' => 0,
'tablenames' => $table 'maxitems' => 9,
], 'items' => [
'MM_opposite_field' => 'items', ['', ''],
'renderType' => 'selectTree',
'treeConfig' => [
'parentField' => 'parent',
'appearance' => [
'expandAll' => 1,
'maxLevels' => 99,
'showHeader' => 1
]
]
]
],
'tx_sgnews_likes' => [
'label' => $localLangDbPath . $table . '.tx_sgnews_likes',
'config' => [
'type' => 'input',
'size' => '20',
'eval' => 'trim',
]
], ],
'lastUpdated' => [ 'fieldControl' => [
'exclude' => TRUE, 'addRecord' => [
'label' => 'LLL:EXT:cms/locallang_tca.xlf:' . $table . '.lastUpdated', 'disabled' => FALSE,
'config' => [ ],
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
'behaviour' => [
'allowLanguageSynchronization' => TRUE,
]
]
], ],
'tx_sgnews_date_end' => [ ],
'exclude' => TRUE, ],
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_end', 'tx_sgnews_content_from_another_page' => [
'config' => [ 'exclude' => TRUE,
'type' => 'input', 'l10n_exclude' => TRUE,
'size' => '13', 'label' => $localLangDbPath . 'pages.tx_sgnews_content_from_another_page',
'max' => '20', 'config' => [
'eval' => 'datetime', 'type' => 'group',
'default' => $GLOBALS['EXEC_TIME'], 'internal_type' => 'db',
'behaviour' => [ 'allowed' => 'pages',
'allowLanguageSynchronization' => TRUE, 'size' => 1,
] 'minitems' => 0,
] 'maxitems' => 1,
'items' => [
['', ''],
]
],
],
'tx_sgnews_related_news' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_related_news',
'config' => [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'pages',
'size' => 5,
'minitems' => 0,
'maxitems' => 99
],
],
'tx_sgnews_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_never_highlighted:=:0',
'onChange' => 'reload',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_highlighted',
'config' => [
'type' => 'check',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
],
],
'tx_sgnews_never_highlighted' => [
'displayCond' => 'FIELD:tx_sgnews_highlighted:=:0',
'onChange' => 'reload',
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_never_highlighted',
'config' => [
'type' => 'check',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
],
],
'tx_sgnews_tags' => [
'exclude' => 1,
'label' => $localLangDbPath . 'pages.tx_sgnews_tags',
'config' => [
'type' => 'select',
'maxitems' => 9999,
'size' => 10,
'foreign_table' => 'sys_category',
'foreign_table_where' => 'AND (IF (###PAGE_TSCONFIG_ID### = 0, 1, sys_category.pid = ###PAGE_TSCONFIG_ID###)) AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC',
'MM' => 'sys_category_record_mm',
'MM_match_fields' => [
'fieldname' => 'tx_sgnews_tags',
'tablenames' => 'pages'
], ],
'tx_sgnews_location' => [ 'MM_opposite_field' => 'items',
'exclude' => TRUE, 'renderType' => 'selectTree',
'label' => $localLangDbPath . $table . '.tx_sgnews_location', 'treeConfig' => [
'config' => [ 'parentField' => 'parent',
'type' => 'input', 'appearance' => [
'size' => 20, 'expandAll' => 1,
'eval' => 'trim', 'maxLevels' => 99,
'behaviour' => [ 'showHeader' => 1
'allowLanguageSynchronization' => TRUE
]
] ]
] ]
] ]
); ],
'tx_sgnews_likes' => [
'label' => $localLangDbPath . 'pages.tx_sgnews_likes',
'config' => [
'type' => 'input',
'size' => '20',
'eval' => 'trim',
]
],
'lastUpdated' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:cms/locallang_tca.xlf:pages.lastUpdated',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
'behaviour' => [
'allowLanguageSynchronization' => TRUE,
]
]
],
'tx_sgnews_date_end' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_end',
'config' => [
'type' => 'input',
'size' => '13',
'max' => '20',
'eval' => 'datetime',
'default' => $GLOBALS['EXEC_TIME'],
'behaviour' => [
'allowLanguageSynchronization' => TRUE,
]
]
],
'tx_sgnews_location' => [
'exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_location',
'config' => [
'type' => 'input',
'size' => 20,
'eval' => 'trim',
'behaviour' => [
'allowLanguageSynchronization' => TRUE
]
]
]
]
);
$GLOBALS['TCA'][$table]['palettes']['titleDescriptionAndHighlightFlag'] = [ $GLOBALS['TCA']['pages']['palettes']['titleDescriptionAndHighlightFlag'] = [
'showitem' => 'subtitle;' . $localLangDbPath . $table . '.subtitle.inPalette, 'showitem' => 'subtitle;' . $localLangDbPath . 'pages.subtitle.inPalette,
--linebreak--, title, --linebreak--, title,
--linebreak--, description, --linebreak--, description,
--linebreak--, slug, --linebreak--, slug,
--linebreak--, tx_projectbase_path_segment, tx_projectbase_excludefromsluggeneration, --linebreak--, tx_projectbase_path_segment, tx_projectbase_excludefromsluggeneration,
--linebreak--, tx_realurl_pathsegment, tx_realurl_exclude, --linebreak--, tx_realurl_pathsegment, tx_realurl_exclude,
--linebreak--, tx_sgnews_highlighted, tx_sgnews_never_highlighted', --linebreak--, tx_sgnews_highlighted, tx_sgnews_never_highlighted',
'canNotCollapse' => 1, 'canNotCollapse' => 1,
]; ];
$GLOBALS['TCA'][$table]['palettes']['editorialWithNewsAuthor'] = [ $GLOBALS['TCA']['pages']['palettes']['editorialWithNewsAuthor'] = [
'showitem' => 'tx_sgnews_news_author, 'showitem' => 'tx_sgnews_news_author,
--linebreak--, lastUpdated;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:' . $table . '.lastUpdated_formlabel, --linebreak--, lastUpdated;LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.lastUpdated_formlabel,
tx_sgnews_date_end, tx_sgnews_date_end,
--linebreak--,tx_sgnews_likes,--linebreak--,tx_sgnews_location', --linebreak--,tx_sgnews_likes,--linebreak--,tx_sgnews_location',
'canNotCollapse' => 1, 'canNotCollapse' => 1,
]; ];
foreach ( foreach (
$GLOBALS['TCA'][$table]['columns'] as $languageExcludeField => $_ $GLOBALS['TCA']['pages']['columns'] as $languageExcludeField => $_
) { ) {
if ( if (
!\in_array( !\in_array(
$languageExcludeField, [ $languageExcludeField, [
'doktype', 'doktype',
'title', 'title',
'subtitle', 'subtitle',
'description', 'description',
'slug', 'slug',
'tx_projectbase_path_segment', 'tx_projectbase_path_segment',
'tx_projectbase_excludefromsluggeneration', 'tx_projectbase_excludefromsluggeneration',
'tx_sgnews_location', 'tx_sgnews_location',
'tx_sgnews_teaser1_image', 'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image', 'tx_sgnews_teaser2_image',
'tx_sgnews_tags', 'tx_sgnews_tags',
'abstract', 'abstract',
'tx_projectbase_seo_titletag', 'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag', 'tx_projectbase_seo_canonicaltag',
'hidden', 'hidden',
'sys_language_uid', 'sys_language_uid',
'tx_languagevisibility_visibility', 'tx_languagevisibility_visibility',
'lastUpdated', 'lastUpdated',
'tx_sgnews_date_end', 'tx_sgnews_date_end',
'tx_sgnews_highlighted', 'tx_sgnews_highlighted',
'tx_sgnews_never_highlighted', 'tx_sgnews_never_highlighted',
] ]
) )
) { ) {
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude'; $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude';
} }
} }
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['title']['label'] = $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['title']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.title'; 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.title';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['subtitle']['label'] = $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['subtitle']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.subtitle'; 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.subtitle';
$GLOBALS['TCA'][$table]['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['slug']['label'] = $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides']['slug']['label'] =
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.slug'; 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.slug';
}, 'sg_news', 'pages'
);
...@@ -24,11 +24,6 @@ ...@@ -24,11 +24,6 @@
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
call_user_func( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
function ($extKey, $table) { 'sg_news', 'Configuration/TypoScript/Frontend', 'News System'
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extKey, 'Configuration/TypoScript/Frontend', 'News System'
);
}, 'sg_news', 'sys_template'
); );
...@@ -24,62 +24,54 @@ ...@@ -24,62 +24,54 @@
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
call_user_func( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
function ($extKey, $table) { 'sg_news',
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'Overview',
$extKey, 'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginOverview.news'
'Overview', );
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginOverview.news'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey, 'sg_news',
'Latest', 'Latest',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginLatest.news' 'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginLatest.news'
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey, 'sg_news',
'ListByCategory', 'ListByCategory',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginCategory.news' 'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:pageTypeTitlePluginCategory.news'
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extKey, 'sg_news',
'NewsByAuthor', 'NewsByAuthor',
'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_backend.xlf:newsFromAuthorPlugin' 'LLL:EXT:sg_news/Resources/Private/Language/locallang_backend.xlf:newsFromAuthorPlugin'
); );
// Removal of the unused plugin setting fields // Removal of the unused plugin setting fields
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_overview'] = 'select_key,pages,recursive'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['sgnews_overview'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_listbycategory'] = 'select_key,pages,recursive'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['sgnews_listbycategory'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_latest'] = 'select_key,pages,recursive'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['sgnews_latest'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_singleview'] = 'select_key,pages,recursive'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['sgnews_singleview'] = 'select_key,pages,recursive';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_excludelist']['sgnews_newsbyauthor'] = 'select_key,pages,recursive'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['sgnews_newsbyauthor'] = 'select_key,pages,recursive';
// Flex form assignment // Flex form assignment
$pluginSignature = str_replace('_', '', $extKey) . '_overview'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgnews_overview'] = 'pi_flexform';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'sgnews_overview', 'FILE:EXT:sg_news/Configuration/FlexForms/Overview.xml'
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/Overview.xml' );
);
$pluginSignature = str_replace('_', '', $extKey) . '_listbycategory'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgnews_listbycategory'] = 'pi_flexform';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'sgnews_listbycategory', 'FILE:EXT:sg_news/Configuration/FlexForms/ListByCategory.xml'
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/ListByCategory.xml' );
);
$pluginSignature = str_replace('_', '', $extKey) . '_latest'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgnews_latest'] = 'pi_flexform';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'sgnews_latest', 'FILE:EXT:sg_news/Configuration/FlexForms/Latest.xml'
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/Latest.xml' );
);
$pluginSignature = str_replace('_', '', $extKey) . '_newsbyauthor'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgnews_newsbyauthor'] = 'pi_flexform';
$GLOBALS['TCA'][$table]['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'sgnews_newsbyauthor', 'FILE:EXT:sg_news/Configuration/FlexForms/NewsByAuthor.xml'
$pluginSignature, 'FILE:EXT:' . $extKey . '/Configuration/FlexForms/NewsByAuthor.xml'
);
}, 'sg_news', 'tt_content'
); );
...@@ -25,64 +25,64 @@ ...@@ -25,64 +25,64 @@
*/ */
call_user_func( call_user_func(
function ($extKey) { static function () {
// common typoscript configuration // common typoscript configuration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
'@import "EXT:' . $extKey . '/Configuration/TypoScript/Common/setup.typoscript"' '@import "EXT:sg_news/Configuration/TypoScript/Common/setup.typoscript"'
); );
// plugin configurations // plugin configurations
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'Overview', 'Overview',
['Overview' => 'overview',], ['Overview' => 'overview',],
['Overview' => '',] ['Overview' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'ListByCategory', 'ListByCategory',
['ListByCategory' => 'index',], ['ListByCategory' => 'index',],
['ListByCategory' => '',] ['ListByCategory' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'SingleView', 'SingleView',
['SingleView' => 'singleView',], ['SingleView' => 'singleView',],
['SingleView' => '',] ['SingleView' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'NewsFeed', 'NewsFeed',
['NewsFeed' => 'index',], ['NewsFeed' => 'index',],
['NewsFeed' => '',] ['NewsFeed' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'Latest', 'Latest',
['Latest' => 'index',], ['Latest' => 'index',],
['Latest' => '',] ['Latest' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'ListByCategory', 'ListByCategory',
['ListByCategory' => 'index',], ['ListByCategory' => 'index',],
['ListByCategory' => '',] ['ListByCategory' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'PageBrowser', 'PageBrowser',
['PageBrowser' => 'index',], ['PageBrowser' => 'index',],
['PageBrowser' => '',] ['PageBrowser' => '',]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'NewsByAuthor', 'NewsByAuthor',
['NewsByAuthor' => 'list',], ['NewsByAuthor' => 'list',],
['NewsByAuthor' => '',] ['NewsByAuthor' => '',]
...@@ -90,7 +90,8 @@ call_user_func( ...@@ -90,7 +90,8 @@ call_user_func(
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sg_ajax')) { if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sg_ajax')) {
\SGalinski\SgAjax\Service\AjaxRegistration::configureAjaxFrontendPlugin( \SGalinski\SgAjax\Service\AjaxRegistration::configureAjaxFrontendPlugin(
$extKey, [ 'sg_news',
[
'Ajax\Like' => 'addLike', 'Ajax\Like' => 'addLike',
] ]
); );
...@@ -133,7 +134,7 @@ call_user_func( ...@@ -133,7 +134,7 @@ call_user_func(
\SGalinski\SgNews\Utility\BackendNewsUtility::registerIcons(); \SGalinski\SgNews\Utility\BackendNewsUtility::registerIcons();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'@import "EXT:' . $extKey . '/Configuration/TsConfig/Page/NewContentElementWizard.tsconfig"' '@import "EXT:sg_news/Configuration/TsConfig/Page/NewContentElementWizard.tsconfig"'
); );
// Add upgrade wizards // Add upgrade wizards
...@@ -147,5 +148,5 @@ call_user_func( ...@@ -147,5 +148,5 @@ call_user_func(
'priority' => 40, 'priority' => 40,
'class' => \TYPO3\Languagevisibility\UserFunction\FieldVisibilityUserFunction::class, 'class' => \TYPO3\Languagevisibility\UserFunction\FieldVisibilityUserFunction::class,
]; ];
}, 'sg_news' }
); );
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
call_user_func( call_user_func(
function ($extKey) { static function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
'tx_sgnews_domain_model_author' 'tx_sgnews_domain_model_author'
); );
...@@ -33,7 +33,7 @@ call_user_func( ...@@ -33,7 +33,7 @@ call_user_func(
if (TYPO3_MODE === 'BE') { if (TYPO3_MODE === 'BE') {
$navigationComponentId = 'TYPO3/CMS/Backend/PageTree/PageTreeElement'; $navigationComponentId = 'TYPO3/CMS/Backend/PageTree/PageTreeElement';
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule( \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'SGalinski.' . $extKey, 'SGalinski.sg_news',
'web', 'web',
'News', 'News',
'', '',
...@@ -42,11 +42,11 @@ call_user_func( ...@@ -42,11 +42,11 @@ call_user_func(
], ],
[ [
'access' => 'user,group', 'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/Resources/Public/Icons/module-sgnews.svg', 'icon' => 'EXT:sg_news/Resources/Public/Icons/module-sgnews.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang.xlf', 'labels' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang.xlf',
'navigationComponentId' => $navigationComponentId 'navigationComponentId' => $navigationComponentId
] ]
); );
} }
}, 'sg_news' }
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment