-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
71 lines (63 loc) · 2.15 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
<?php
declare(strict_types = 1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
use VV\T3meilisearch\Controller\SearchController;
use VV\T3meilisearch\Service\IndexService;
defined('TYPO3') or defined('TYPO3_MODE') or die();
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached']['t3meilisearch']
= IndexService::class . '->indexPageContent';
ExtensionUtility::configurePlugin(
'T3meilisearch',
'Pi1',
[
SearchController::class => 'search',
],
[
SearchController::class => 'search',
],
);
ExtensionUtility::configurePlugin(
'T3meilisearch',
'Pi2',
[
SearchController::class => 'form',
],
[
SearchController::class => '',
],
);
// Show core checkbox to exclude pages from indexing
ExtensionManagementUtility::addPageTSConfig('
TCEFORM.pages.no_search.disabled = 0
TCEFORM.pages.no_index.disabled = 0
');
// Add content elements for plugins
ExtensionManagementUtility::addPageTSConfig('
mod.wizards.newContentElement.wizardItems.forms {
elements {
search {
iconIdentifier = content-special-indexed_search
title = LLL:EXT:t3meilisearch/Resources/Private/Language/locallang.xlf:pi1
description = LLL:EXT:t3meilisearch/Resources/Private/Language/locallang.xlf:pi1.description
tt_content_defValues {
CType = list
list_type = t3meilisearch_pi1
}
saveAndClose = true
}
mini_search {
iconIdentifier = content-special-indexed_search
title = LLL:EXT:t3meilisearch/Resources/Private/Language/locallang.xlf:pi2
description = LLL:EXT:t3meilisearch/Resources/Private/Language/locallang.xlf:pi2.description
tt_content_defValues {
CType = list
list_type = t3meilisearch_pi1
}
saveAndClose = true
}
}
show :=addToList(search)
show :=addToList(mini_search)
}
');