-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
168 lines (157 loc) · 5.85 KB
/
ext_tables.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'TYPO3 Blog');
/**
* Plugin Configuration
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Blog', 'Blog');
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Comment', 'Blog Comment');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_blog'] = 'layout,select_key,pages,recursive';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['blogmaster_blog'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'blogmaster_blog',
'FILE:EXT:blogmaster/Configuration/FlexForms/Blog.xml'
);
/**
* ContentElementWizard for Blog
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:blogmaster/Configuration/TSConfig/ContentElementWizard.ts">'
);
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY]
= \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/Hooks/PageLayoutView.php:Tutorboy\Blogmaster\Hooks\PageLayoutView';
/**
* Register icons
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'extension-blogmaster-blog',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/Blog.svg']
);
$iconRegistry->registerIcon(
'extension-blogmaster-donate',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/piggy-bank.svg']
);
$iconRegistry->registerIcon(
'extension-blogmaster-bugs',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/bugs.svg']
);
$iconRegistry->registerIcon(
'extension-blogmaster-help',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/help.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-collapse',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-view-list-collapse.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-expand',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-view-list-expand.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-close',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-close.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-plus',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-plus.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-cal',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-date.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-edit',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/actions-edit.svg']
);
$iconRegistry->registerIcon(
'ext-blogmaster-comments',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:blogmaster/Resources/Public/Icons/chat.svg']
);
if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
// Hijack: Typo3 default module listing order
$GLOBALS['TBE_MODULES'] = array_merge(array('Tutorboy' => ''), $GLOBALS['TBE_MODULES']);
$GLOBALS['TBE_MODULES']['_configuration']['Tutorboy'] = array(
'labels' => array(
'll_ref' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf:blog.mlang_tabs_tab',
'tabs_images' => array(
'tab' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/Blog.svg',
)
),
'name' => 'Tutorboy', /* New main module key as 'pw' */
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Tutorboy.' . $_EXTKEY,
'Tutorboy',
'blog',
'top',
array(
'Post' => 'list,new,create,edit,update,delete',
'Category' => 'list,new,create,delete,ajax',
'Tag' => 'list,new,create,delete,ajax',
'Comment' => 'list,new,create,delete,ajax,update,edit',
'File' => 'getFileInfo'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/Posts.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf:post.mlang_tabs_tab'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Tutorboy.' . $_EXTKEY,
'Tutorboy',
'cat',
'',
array(
'Category' => 'list,new,create,delete'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/Category.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf:category.mlang_tabs_tab'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Tutorboy.' . $_EXTKEY,
'Tutorboy',
'tag',
'',
array(
'Tag' => 'list,new,create,delete,ajax'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/Tags.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf:tag.mlang_tabs_tab'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Tutorboy.' . $_EXTKEY,
'Tutorboy',
'comment',
'',
array(
'Comment' => 'list,new,edit,update,create,delete,addComment,ajax',
'Post' => 'edit'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/Comments.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xlf:comment.mlang_tabs_tab'
)
);
}