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