forked from fnagel/t3extblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
82 lines (77 loc) · 3.37 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
<?php
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use FelixNagel\T3extblog\Controller\BackendDashboardController;
use FelixNagel\T3extblog\Controller\BackendPostController;
use FelixNagel\T3extblog\Controller\BackendCommentController;
use FelixNagel\T3extblog\Controller\BackendSubscriberController;
defined('TYPO3') || die();
call_user_func(static function ($packageKey) {
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_post');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_cat');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_com');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_com_nl');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_blog_nl');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_pingback');
ExtensionManagementUtility::allowTableOnStandardPages('tx_t3blog_trackback');
// Add icons to registry
/* @var $iconRegistry IconRegistry */
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
$iconRegistry->registerIcon(
'extensions-t3extblog-post',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/page.png']
);
$iconRegistry->registerIcon(
'extensions-t3extblog-category',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/category.png']
);
$iconRegistry->registerIcon(
'extensions-t3extblog-comment',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/comment.png']
);
$iconRegistry->registerIcon(
'extensions-t3extblog-subscriber',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/subscriber.png']
);
$iconRegistry->registerIcon(
'extensions-t3extblog-trackback',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/trackback.png']
);
$iconRegistry->registerIcon(
'extensions-t3extblog-plugin',
BitmapIconProvider::class,
['source' => 'EXT:'.$packageKey.'/Resources/Public/Icons/module.png']
);
$iconRegistry->registerIcon(
'tcarecords-pages-contains-t3blog',
BitmapIconProvider::class,
['source' => 'EXT:t3extblog/Resources/Public/Icons/folder.png']
);
// Register Backend Module
ExtensionUtility::registerModule(
'T3extblog',
'web',
'Tx_T3extblog',
'',
[
BackendDashboardController::class => 'index',
BackendPostController::class => 'index, sendPostNotifications',
BackendCommentController::class => 'index, listPending, listByPost',
BackendSubscriberController::class => 'indexPostSubscriber, indexBlogSubscriber',
],
[
'access' => 'user,group',
'icon' => 'EXT:'.$packageKey.'/Resources/Public/Icons/module.png',
'labels' => 'LLL:EXT:'.$packageKey.'/Resources/Private/Language/locallang_mod.xlf',
'navigationComponentId' => 'TYPO3/CMS/Backend/PageTree/PageTreeElement',
]
);
}, 't3extblog');