-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
51 lines (44 loc) · 1.95 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
call_user_func(
function($extKey) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extKey,
'Configuration/TypoScript/Static',
'tollwerk Blog'
);
// Allow records on standard pages
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_twblog_domain_model_comment');
// Register blog article list plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Tollwerk.TwBlog',
'Blog',
'LLL:EXT:tw_blog/Resources/Private/Language/locallang_db.xlf:plugin.blog',
'EXT:tw_blog/Resources/Public/Icons/Extension/Blog.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['twblog_blog'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'twblog_blog',
'FILE:EXT:tw_blog/Configuration/FlexForms/Blog.xml'
);
// Add new doktypes
$archiveDoktype = \Tollwerk\TwBlog\Domain\Repository\BlogArticleRepository::DOKTYPE;
$GLOBALS['PAGES_TYPES'][$archiveDoktype] = [
'type' => 'web',
'allowedTables' => '*',
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList('.$archiveDoktype.')'
);
// Register icons in icon factory
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'apps-pagetree-blog',
TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:'.$extKey.'/Resources/Public/Icons/Extension/apps-pagetree-page-blogpage.svg',]
);
},
'tw_blog'
);