-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.php
More file actions
40 lines (33 loc) · 1.17 KB
/
Copy pathext_tables.php
File metadata and controls
40 lines (33 loc) · 1.17 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'ws_bootstrapthree',
'Configuration/TypoScript',
'WsBootstrap Settings'
);
call_user_func(
function ($extKey) {
$archiveDoktype = 116;
// Add new page type:
$GLOBALS['PAGES_TYPES'][$archiveDoktype] = [
'type' => 'web',
'allowedTables' => '*',
];
// Provide icon for page tree, list view, ... :
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)
->registerIcon(
'apps-pagetree-archive',
TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
[
'source' => 'EXT:' . $extKey . '/Resources/Public/Icons/Archive.svg',
]
);
// Allow backend users to drag and drop the new page type:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $archiveDoktype . ')'
);
},
'ws_bootstrapthree'
);