forked from internetgalerie/ig_slug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
45 lines (36 loc) · 1.42 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
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function()
{
if (TYPO3_MODE === 'BE') {
$extConf = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
)->get('ig_slug');
if (isset($extConf['disableOwnMenuItem']) && $extConf['disableOwnMenuItem']==1) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction(
'web_info',
\Ig\IgSlug\Controller\SlugController::class,
null,
'LLL:EXT:ig_slug/Resources/Private/Language/locallang_rebuild.xlf:mlang_tabs_tab'
);
} else {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Ig.IgSlug',
'web', // Make module a submodule of 'web'
'rebuild', // Submodule key
'', // Position
[
'Slug' => 'list, update',
],
[
'access' => 'user,group',
'icon' => 'EXT:ig_slug/Resources/Public/Icons/user_mod_rebuild.svg',
'labels' => 'LLL:EXT:ig_slug/Resources/Private/Language/locallang_rebuild.xlf',
]
);
}
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('ig_slug', 'Configuration/TypoScript', 'Managing slugs');
}
);