| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- * Allow language synchronization for FAL fields
- */
- $allowSync = [
- 'tt_content' => [
- 'image',
- 'media'
- ]
- ];
- foreach ($allowSync as $syncTablename => $syncColumns) {
- foreach ($syncColumns as $syncColumn) {
- $GLOBALS['TCA'][$syncTablename]['columns'][$syncColumn]['config']['behaviour']['allowLanguageSynchronization'] = 1;
- }
- }
- /**
- * Add crop editor
- */
- $cropConfiguration = \CYBOB\EumSitePackage\Utility\TcaUtility::getDefaultCropConfiguration();
- $cropColumnsByType = [
- 'image' => [
- 'image'
- ],
- 'menu_pages' => [
- 'image'
- ],
- 'menu_subpages' => [
- 'image'
- ],
- 'menu_categorized_pages' => [
- 'image'
- ]
- ];
- foreach ($cropColumnsByType as $type => $cropColumns) {
- foreach ($cropColumns as $cropColumn) {
- $GLOBALS['TCA']['tt_content']['types'][$type]['columnsOverrides'][$cropColumn]['config']['overrideChildTca']['columns']['crop']['config'] = [
- 'cropVariants' => array_merge_recursive(
- [
- 'default' => [
- 'disabled' => true
- ]
- ],
- $cropConfiguration
- )
- ];
- }
- }
|