-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.php
More file actions
64 lines (52 loc) · 2.38 KB
/
Copy pathext_tables.php
File metadata and controls
64 lines (52 loc) · 2.38 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
defined('TYPO3') or die();
ExtensionUtility::registerPlugin(
'Elearning',
'Courses',
'LLL:EXT:elearning/Resources/Private/Language/locallang_db.xlf:plugin.courses.title',
'elearning-plugin-courses'
);
ExtensionUtility::registerPlugin(
'Elearning',
'CourseDetail',
'LLL:EXT:elearning/Resources/Private/Language/locallang_db.xlf:plugin.coursedetail.title',
'elearning-plugin-coursedetail'
);
ExtensionUtility::registerPlugin(
'Elearning',
'Lesson',
'LLL:EXT:elearning/Resources/Private/Language/locallang_db.xlf:plugin.lesson.title',
'elearning-plugin-lesson'
);
ExtensionUtility::registerPlugin(
'Elearning',
'Dashboard',
'LLL:EXT:elearning/Resources/Private/Language/locallang_db.xlf:plugin.dashboard.title',
'elearning-plugin-dashboard'
);
ExtensionManagementUtility::addPiFlexFormValue(
'elearning_courses',
'FILE:EXT:elearning/Configuration/FlexForms/Courses.xml'
);
ExtensionManagementUtility::addPiFlexFormValue(
'elearning_coursedetail',
'FILE:EXT:elearning/Configuration/FlexForms/CourseDetail.xml'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['elearning_courses'] = 'pi_flexform';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['elearning_coursedetail'] = 'pi_flexform';
// Keep plugin editing minimal: hide fields that are not used by these plugins.
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['elearning_courses'] =
'select_key, recursive, bodytext, subheader, layout';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['elearning_coursedetail'] =
'select_key, recursive, bodytext, subheader, layout';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['elearning_lesson'] =
'select_key, pages, recursive, bodytext, subheader, layout, pi_flexform';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['elearning_dashboard'] =
'select_key, pages, recursive, bodytext, subheader, layout, pi_flexform';
ExtensionManagementUtility::addPageTSConfig(
"TCEFORM.tt_content.pi_flexform.elearning_courses.sDEF.settings\\.courseDetailPid.disabled = 0\n" .
"TCEFORM.tt_content.pi_flexform.elearning_coursedetail.sDEF.settings\\.lessonPid.disabled = 0\n"
);