-
Notifications
You must be signed in to change notification settings - Fork 3
/
ext_localconf.php
48 lines (43 loc) · 1.59 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
<?php
use Sunzinet\SzQuickfinder\Controller\SearchController;
use Sunzinet\SzQuickfinder\Domain\Repository\SearchRepository;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') || exit;
// Configure plugins
(static function (): void {
ExtensionUtility::configurePlugin(
'SzQuickfinder',
'Pi1',
[SearchController::class => 'index, search, autocomplete']
);
ExtensionUtility::configurePlugin(
'SzQuickfinder',
'Index',
[SearchController::class => 'index'],
[SearchController::class => 'index']
);
ExtensionUtility::configurePlugin(
'SzQuickfinder',
'Search',
[SearchController::class => 'search'],
[SearchController::class => 'search']
);
ExtensionUtility::configurePlugin(
'SzQuickfinder',
'Autocomplete',
[SearchController::class => 'autocomplete'],
[SearchController::class => 'autocomplete']
);
})();
// Setting ext config
(static function (): void {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sz_quickfinder']['default']['repository'] =
SearchRepository::class;
})();
// Adjust global TYPO3 config variables
(static function (): void {
// Exclude searchParameter from cHash, due to problems with pageNotFoundOnCHashError=1
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_szquickfinder_pi1[searchString]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_szquickfinder_autocomplete[searchString]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] .= ', nav_hide';
})();