Skip to content
Snippets Groups Projects
Commit 7989b187 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[TASK] Exlude / L10n-Exclude some TCA more fields, Cleanup

parent d3314bb3
No related branches found
No related tags found
No related merge requests found
<?php
/**
*
* Copyright notice
......@@ -206,6 +207,7 @@ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::
],
'tx_sgnews_news_author' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_news_author',
'config' => [
'type' => 'group',
......@@ -288,7 +290,8 @@ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::
],
],
'tx_sgnews_tags' => [
'exclude' => 1,
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_tags',
'config' => [
'type' => 'select',
......@@ -314,6 +317,8 @@ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::
]
],
'tx_sgnews_likes' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => $localLangDbPath . 'pages.tx_sgnews_likes',
'config' => [
'type' => 'input',
......@@ -323,6 +328,7 @@ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::
],
'lastUpdated' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.lastUpdated',
'config' => [
'type' => 'input',
......@@ -337,6 +343,7 @@ $GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::
],
'tx_sgnews_date_end' => [
'exclude' => TRUE,
'l10n_exclude' => TRUE,
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:pages.tx_sgnews_date_end',
'config' => [
'type' => 'input',
......@@ -383,36 +390,30 @@ $GLOBALS['TCA']['pages']['palettes']['editorialWithNewsAuthor'] = [
'canNotCollapse' => 1,
];
foreach (
$GLOBALS['TCA']['pages']['columns'] as $languageExcludeField => $_
) {
if (
!\in_array(
$languageExcludeField, [
'doktype',
'title',
'subtitle',
'description',
'slug',
'tx_projectbase_path_segment',
'tx_projectbase_excludefromsluggeneration',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'tx_sgnews_tags',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'sys_language_uid',
'tx_languagevisibility_visibility',
'lastUpdated',
'tx_sgnews_date_end',
'tx_sgnews_highlighted',
'tx_sgnews_never_highlighted',
]
)
) {
foreach ($GLOBALS['TCA']['pages']['columns'] as $languageExcludeField => $_) {
if (!in_array($languageExcludeField, [
'doktype',
'title',
'subtitle',
'description',
'slug',
'tx_projectbase_path_segment',
'tx_projectbase_excludefromsluggeneration',
'tx_sgnews_location',
'tx_sgnews_teaser1_image',
'tx_sgnews_teaser2_image',
'tx_sgnews_tags',
'abstract',
'tx_projectbase_seo_titletag',
'tx_projectbase_seo_canonicaltag',
'hidden',
'sys_language_uid',
'tx_languagevisibility_visibility',
'lastUpdated',
'tx_sgnews_date_end',
'tx_sgnews_highlighted',
'tx_sgnews_never_highlighted',
])) {
$GLOBALS['TCA']['pages']['types'][\SGalinski\SgNews\Utility\BackendNewsUtility::NEWS_DOKTYPE]['columnsOverrides'][$languageExcludeField]['l10n_mode'] = 'exclude';
}
}
......
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