forked from xperseguers/t3ext-ig_ldap_sso_auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
executable file
·66 lines (63 loc) · 2.83 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
<?php
defined('TYPO3_MODE') || die();
(static function (string $_EXTKEY) {
// Register additional sprite icons
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon('extensions-ig_ldap_sso_auth-overlay-ldap-record',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
[
'source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/overlay-ldap-record.png',
]
);
unset($iconRegistry);
if (TYPO3_MODE === 'BE') {
// Add BE module on top of system main module
$typo3Branch = class_exists(\TYPO3\CMS\Core\Information\Typo3Version::class)
? (new \TYPO3\CMS\Core\Information\Typo3Version())->getBranch()
: TYPO3_branch;
if (version_compare($typo3Branch, '10.0', '<')) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Causal.' . $_EXTKEY,
'system',
'txigldapssoauthM1',
'top',
[
'Module' => implode(',', [
'index',
'status',
'search',
'importFrontendUsers', 'importBackendUsers',
'importFrontendUserGroups', 'importBackendUserGroups',
]),
], [
'access' => 'admin',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-ldap.png',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf'
]
);
} else {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
$_EXTKEY,
'system',
'txigldapssoauthM1',
'top',
[
\Causal\IgLdapSsoAuth\Controller\ModuleController::class => implode(',', [
'index',
'status',
'search',
'importFrontendUsers', 'importBackendUsers',
'importFrontendUserGroups', 'importBackendUserGroups',
]),
], [
'access' => 'admin',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/module-ldap.png',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xlf'
]
);
}
}
// Initialize "context sensitive help" (csh)
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_igldapssoauth_config', 'EXT:ig_ldap_sso_auth/Resources/Private/Language/locallang_csh_db.xlf');
})('ig_ldap_sso_auth');