-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathext_localconf.php
42 lines (34 loc) · 1.45 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
<?php
/*
* This file is part of the package ID\IndexedSearchAutocomplete.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
defined('TYPO3') or die('Access denied.');
(function() {
// Define TypoScript as content rendering template
$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'indexed_search_autocomplete/Configuration/TypoScript/';
// Make the extension configuration accessible
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
);
$indexedSearchAutocompleteConfiguration = $extensionConfiguration->get('indexed_search_autocomplete');
// Check whether to add Jquery 3.2 to the Frontend
if (!$indexedSearchAutocompleteConfiguration['disableJquerySource']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('
page.includeJSFooterlibs.JquerySource = {$plugin.tx_indexedsearch_autocomplete.jqueryFile}
');
}
// Register Application
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'IndexedSearchAutocomplete',
'Search',
[
\ID\IndexedSearchAutocomplete\Controller\SearchController::class => 'search',
],
[
\ID\IndexedSearchAutocomplete\Controller\SearchController::class => 'search',
]
);
})();