forked from martinhummer/search_algolia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_tables.php
59 lines (53 loc) · 1.52 KB
/
ext_tables.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
<?php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$_EXTKEY,
'Configuration/TypoScript/',
'Search Algolia'
);
/**
* Include Backend Module
*/
if (TYPO3_MODE === 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Mahu.search_algolia',
'web',
'm1',
'',
[
'Module' => 'list, triggerReIndexing'
],
[
'access' => 'user,group',
'icon' => 'EXT:'.$_EXTKEY.'/Resources/Public/Icons/algolia.svg',
'labels' => 'LLL:EXT:'.$_EXTKEY.'/Resources/Private/Language/locallang_mod.xlf'
]
);
}
/**
* Register Frontend Plugin
*/
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Mahu.search_algolia',
'Algolia',
'Algolia Frontend Plugin'
);
/**
* Add Flexform to frontend Plugin
*/
$pluginSignature = str_replace('_', '', $_EXTKEY) . '_algolia';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:' .
$_EXTKEY .
'/Configuration/FlexForms/flexform_algolia.xml'
);
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Mahu']['SearchAlgolia'] = [
'writerConfiguration' => [
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [
'logFile' => \Mahu\SearchAlgolia\Bootstrap::getEnvironment()->loggingPath(). '/algolia.log'
]
]
],
];