forked from pagemachine/hairu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
81 lines (74 loc) · 2.92 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
<?php
defined('TYPO3_MODE') or die();
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'PAGEmachine.Hairu',
'Auth',
[
'Authentication' => 'showLoginForm, showLogoutForm, showPasswordResetForm, startPasswordReset, completePasswordReset',
],
[
'Authentication' => 'showLoginForm, showLogoutForm, showPasswordResetForm, startPasswordReset, completePasswordReset',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'PAGEmachine.Hairu',
'Password',
[
'Password' => 'showPasswordUpdateForm,updatePassword',
],
[
'Password' => 'showPasswordUpdateForm,updatePassword',
]
);
// Cache configuration
if (!is_array($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['hairu_token'])) {
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['hairu_token'] = [
'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class,
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
'groups' => [
'system',
],
];
}
// Logging configuration
if (empty($GLOBALS['TYPO3_CONF_VARS']['LOG']['PAGEmachine']['Hairu']['writerConfiguration'])) {
$GLOBALS['TYPO3_CONF_VARS']['LOG']['PAGEmachine']['Hairu']['writerConfiguration'] = [
// WARNING and higher severity
\TYPO3\CMS\Core\Log\LogLevel::WARNING => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
'logFile' => 'typo3temp/logs/hairu.log',
],
],
];
}
(function () {
// New content element wizard icon
$icons = [
'hairu-wizard-icon' => 'login.svg',
];
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
foreach ($icons as $identifier => $path) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:hairu/Resources/Public/Icons/' . $path]
);
}
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
\PAGEmachine\Hairu\Controller\AuthenticationController::class,
'afterLogin',
\PAGEmachine\Hairu\Slots\RedirectUrlSlot::class,
'processRedirect'
);
$signalSlotDispatcher->connect(
\PAGEmachine\Hairu\Controller\AuthenticationController::class,
'afterLogout',
\PAGEmachine\Hairu\Slots\RedirectUrlSlot::class,
'processRedirect'
);
})();
if (!class_exists(\TYPO3\CMS\Core\Site\SiteFinder::class)) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\PAGEmachine\Hairu\Validation\Validator\RedirectUrlValidator::class]['className'] = \PAGEmachine\Hairu\Validation\Validator\LegacyRedirectUrlValidator::class;
}