-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
49 lines (43 loc) · 1.61 KB
/
ext_localconf.php
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
47
48
49
<?php
use FGTCLB\AcademicProjects\Controller\ProjectController;
use FGTCLB\AcademicProjects\Enumeration\PageTypes;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
(static function (): void {
$versionInformation = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class);
// Starting with TYPO3 v12.0 Configuration/page.tsconfig in an Extension is automatically loaded during build time
// @see https://docs.typo3.org/m/typo3/reference-tsconfig/12.4/en-us/UsingSetting/PageTSconfig.html#pagesettingdefaultpagetsconfig
if ($versionInformation->getMajorVersion() < 12) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
@import \'EXT:academic_programs/Configuration/page.tsconfig\'
');
}
$projectDokType = PageTypes::TYPE_ACEDEMIC_PROJECT;
// Allow backend users to drag and drop the new page type:
ExtensionManagementUtility::addUserTSConfig(
sprintf(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(%d)',
$projectDokType
)
);
ExtensionUtility::configurePlugin(
'AcademicProjects',
'ProjectList',
[
ProjectController::class => 'list',
],
[
ProjectController::class => 'list',
]
);
ExtensionUtility::configurePlugin(
'AcademicProjects',
'ProjectListSingle',
[
ProjectController::class => 'list',
],
[
ProjectController::class => 'list',
]
);
})();