|
2 | 2 |
|
3 | 3 | declare(strict_types = 1);
|
4 | 4 |
|
5 |
| -// Feature is not available if EXT:static_info_tables is not loaded |
6 |
| -if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) { |
7 |
| - $temporaryColumns = [ |
8 |
| - 'tx_locate_regions' => [ |
9 |
| - 'exclude' => true, |
10 |
| - 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_regions', |
11 |
| - 'config' => [ |
12 |
| - 'type' => 'select', |
13 |
| - 'renderType' => 'selectMultipleSideBySide', |
14 |
| - 'foreign_table' => 'tx_locate_domain_model_region', |
15 |
| - 'foreign_table_where' => 'ORDER BY title', |
16 |
| - 'MM' => 'tx_locate_page_region_mm', |
17 |
| - 'size' => 10, |
18 |
| - 'autoSizeMax' => 30, |
19 |
| - 'multiple' => false, |
20 |
| - 'items' => [ |
21 |
| - [ |
22 |
| - 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_regions.applyWhenNoMatch', |
23 |
| - 'value' => \Leuchtfeuer\Locate\Domain\Repository\RegionRepository::APPLY_WHEN_NO_IP_MATCHES, |
24 |
| - ], |
| 5 | +$temporaryColumns = [ |
| 6 | + 'tx_locate_regions' => [ |
| 7 | + 'exclude' => true, |
| 8 | + 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_regions', |
| 9 | + 'config' => [ |
| 10 | + 'type' => 'select', |
| 11 | + 'renderType' => 'selectMultipleSideBySide', |
| 12 | + 'foreign_table' => 'tx_locate_domain_model_region', |
| 13 | + 'foreign_table_where' => 'ORDER BY title', |
| 14 | + 'MM' => 'tx_locate_page_region_mm', |
| 15 | + 'size' => 10, |
| 16 | + 'autoSizeMax' => 30, |
| 17 | + 'multiple' => false, |
| 18 | + 'items' => [ |
| 19 | + [ |
| 20 | + 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_regions.applyWhenNoMatch', |
| 21 | + 'value' => \Leuchtfeuer\Locate\Domain\Repository\RegionRepository::APPLY_WHEN_NO_IP_MATCHES, |
25 | 22 | ],
|
26 | 23 | ],
|
27 | 24 | ],
|
28 |
| - 'tx_locate_invert' => [ |
29 |
| - 'exclude' => true, |
30 |
| - 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_invert', |
31 |
| - 'description' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_invert.description', |
32 |
| - 'config' => [ |
33 |
| - 'type' => 'check', |
34 |
| - 'renderType' => 'checkboxToggle', |
35 |
| - ], |
| 25 | + ], |
| 26 | + 'tx_locate_invert' => [ |
| 27 | + 'exclude' => true, |
| 28 | + 'label' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_invert', |
| 29 | + 'description' => 'LLL:EXT:locate/Resources/Private/Language/Database.xlf:pages.tx_locate_invert.description', |
| 30 | + 'config' => [ |
| 31 | + 'type' => 'check', |
| 32 | + 'renderType' => 'checkboxToggle', |
36 | 33 | ],
|
37 |
| - ]; |
| 34 | + ], |
| 35 | +]; |
38 | 36 |
|
39 |
| - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $temporaryColumns); |
40 |
| - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( |
41 |
| - 'pages', |
42 |
| - '--div--;LLL:EXT:locate/Resources/Private/Language/Database.xlf:tabs.locate,tx_locate_invert,tx_locate_regions' |
43 |
| - ); |
44 |
| -} |
| 37 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $temporaryColumns); |
| 38 | +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( |
| 39 | + 'pages', |
| 40 | + '--div--;LLL:EXT:locate/Resources/Private/Language/Database.xlf:tabs.locate,tx_locate_invert,tx_locate_regions' |
| 41 | +); |
0 commit comments