-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_tables.php
More file actions
executable file
·33 lines (27 loc) · 1.09 KB
/
ext_tables.php
File metadata and controls
executable file
·33 lines (27 loc) · 1.09 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
<?php
call_user_func(
function($extKey)
{
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($extKey, 'Configuration/TypoScript', 'Monkeyhead');
$storageDoktype = 142;
// Add new page type:
$GLOBALS['PAGES_TYPES'][$storageDoktype] = [
'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-monkeyhead-storage',
TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
[
'source' => 'EXT:' . $extKey . '/Resources/Public/Icons/storage.svg',
]
);
// Allow backend users to drag and drop the new page type:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . $storageDoktype . ')'
);
},
'monkeyhead'
);