-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
46 lines (39 loc) · 1.43 KB
/
ext_localconf.php
File metadata and controls
46 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
declare(strict_types=1);
use FGTCLB\AcademicPrograms\Controller\DetailsController;
use FGTCLB\AcademicPrograms\Controller\ProgramController;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') or die;
(static function (): void {
$versionInformation = new Typo3Version();
// Starting with TYPO3 v13.0 Configuration/user.tsconfig in an Extension is automatically loaded during build time
// @see https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.0/Deprecation-101807-ExtensionManagementUtilityaddUserTSConfig.html
if ($versionInformation->getMajorVersion() < 13) {
// Allow backend users to drag and drop the new page type:
ExtensionManagementUtility::addUserTSConfig('
@import \'EXT:academic_programs/Configuration/user.tsconfig\'
');
}
ExtensionUtility::configurePlugin(
'AcademicPrograms',
'ProgramList',
[
ProgramController::class => 'list',
],
[
ProgramController::class => 'list',
],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT,
);
ExtensionUtility::configurePlugin(
'AcademicPrograms',
'ProgramDetails',
[
DetailsController::class => 'show',
],
[],
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT,
);
})();