-
-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt TCA for 11 only Drop usage of ObjectManager if possiblee Check for undefined index
- Loading branch information
1 parent
be26661
commit 9fe96a4
Showing
8 changed files
with
72 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
defined('TYPO3') or die(); | ||
|
||
call_user_func(static function () { | ||
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class); | ||
if ($versionInformation->getMajorVersion() === 11) { | ||
foreach (['link', 'news', 'tag'] as $tableSuffix) { | ||
$GLOBALS['TCA']['tx_news_domain_model_' . $tableSuffix]['columns']['sys_language_uid']['config'] = [ | ||
'type' => 'language' | ||
]; | ||
} | ||
|
||
$showRemovedLocalizationRecordsFields = [ | ||
'sys_category' => ['images'], | ||
'tx_news_domain_model_news' => ['related_links', 'content_elements', 'fal_media', 'fal_related_files'] | ||
]; | ||
|
||
foreach ($showRemovedLocalizationRecordsFields as $tableName => $fields) { | ||
foreach ($fields as $field) { | ||
unset($GLOBALS['TCA'][$tableName]['columns'][$field]['config']['appearance']['showRemovedLocalizationRecords']); | ||
} | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters