-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
78 lines (71 loc) · 3.57 KB
/
ext_localconf.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
<?php
defined('TYPO3') or die('Access denied.');
(function () {
// Hook to dynamically add filters to flexform
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools::class]['flexParsing'][]
= \B13\Newspage\Hooks\PrefilterFlexform::class;
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Newspage',
'List',
[\B13\Newspage\Controller\NewsController::class => 'list'],
[\B13\Newspage\Controller\NewsController::class => 'list'],
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Newspage',
'Latest',
[\B13\Newspage\Controller\NewsController::class => 'latest'],
[],
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Newspage',
'Teaser',
[\B13\Newspage\Controller\NewsController::class => 'teaser'],
[],
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
);
B13\Newspage\Service\FilterService::registerFilter(
'Date',
\B13\Newspage\Filter\DateFilter::class,
'LLL:EXT:newspage/Resources/Private/Language/locallang_be.xlf:news.date'
);
B13\Newspage\Service\FilterService::registerFilter(
'Category',
\B13\Newspage\Filter\CategoryFilter::class,
'LLL:EXT:newspage/Resources/Private/Language/locallang_be.xlf:category',
'EXT:newspage/Configuration/FlexForms/Filter/Category.xml'
);
B13\Newspage\Service\FilterService::registerFilter(
'Categories',
\B13\Newspage\Filter\CategoriesFilter::class,
'LLL:EXT:newspage/Resources/Private/Language/locallang_be.xlf:filter.categories'
);
$typo3Version = new \TYPO3\CMS\Core\Information\Typo3Version();
if (version_compare($typo3Version->getVersion(), '11.0.0', '<')) {
$icons = [
'apps-pagetree-newspage-page' => 'apps-pagetree-newspage-page',
'apps-pagetree-newspage-page-hideinmenu' => 'apps-pagetree-newspage-page-hideinmenu',
'apps-pagetree-newspage-article' => 'apps-pagetree-newspage-article',
'apps-pagetree-newspage-article-hideinmenu' => 'apps-pagetree-newspage-article-hideinmenu',
'apps-pagetree-newspage-category' => 'apps-pagetree-newspage-category',
'apps-pagetree-newspage-category-hideinmenu' => 'apps-pagetree-newspage-category-hideinmenu',
'apps-pagetree-newspage-overview' => 'apps-pagetree-newspage-overview',
'apps-pagetree-newspage-overview-hideinmenu' => 'apps-pagetree-newspage-overview-hideinmenu',
'apps-pagetree-newspage-tag' => 'apps-pagetree-newspage-tag',
'apps-pagetree-newspage-tag-hideinmenu' => 'apps-pagetree-newspage-tag-hideinmenu',
'mimetypes-newspage' => 'mimetypes-newspage',
'apps-pagetree-folder-newspages' => 'apps-pagetree-folder-newspages',
];
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
foreach ($icons as $identifier => $path) {
if (!$iconRegistry->isRegistered($identifier)) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:newspage/Resources/Public/Icons/' . $path . '.svg']
);
}
}
}
})();