-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathext_localconf.php
94 lines (81 loc) · 2.7 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
use NITSAN\NsT3dev\Controller\ProductAreaController;
use TYPO3\CMS\Core\Imaging\IconRegistry;
use TYPO3\CMS\Core\Log\LogLevel;
use TYPO3\CMS\Core\Log\Writer\DatabaseWriter;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') || die();
(static function() {
ExtensionUtility::configurePlugin(
'NsT3dev',
'Listing',
[
ProductAreaController::class => 'list, new, create, edit, update, delete'
],
// non-cacheable actions
[
ProductAreaController::class => 'create, update, delete'
]
);
ExtensionUtility::configurePlugin(
'NsT3dev',
'Show',
[
ProductAreaController::class => 'show'
],
);
ExtensionUtility::configurePlugin(
'NsT3dev',
'Validation',
[
ProductAreaController::class => 'validation'
],
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'NsT3dev',
'ExampleForDBAL',
[
\NITSAN\NsT3dev\Controller\ProductAreaController::class => 'listForDatabase'
],
);
// Set Plugin Icon
$pluginsIdentifiers = [
'ns_t3dev-plugin-listing',
'ns_t3dev-plugin-show',
'ns_t3dev-plugin-validation',
'ns_t3dev-plugin-ExampleForDBAL'
];
$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
foreach ($pluginsIdentifiers as $identifier) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:ns_t3dev/Resources/Public/Icons/'.$identifier.'.png']
);
}
$GLOBALS['TYPO3_CONF_VARS']['LOG']['NITSAN']['NsT3dev']['Controller']['writerConfiguration'] = [
LogLevel::INFO => [
DatabaseWriter::class => [
'logTable' => 'tx_nst3dev_domain_model_log',
],
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addService(
'ns_t3dev', // Extension Key
'auth' ,// Service type
NITSAN\NsT3dev\Service\LoginAuthService::class ,// Service key
array(
'title' => 'Authentication for Login Service',
'description' => 'Authentication for users',
'subtype' => 'authUserFE,getUserFE',
'available' => true,
'priority' => 82, /* will be called before default typo3 authentication service */
'quality' => 82,
'os' => '',
'exec' => '',
'className' => NITSAN\NsT3dev\Service\LoginAuthService::class,
)
);
})();