2016-12-09 13:19:35 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
call_user_func(
|
|
|
|
function ($extensionKey) {
|
|
|
|
// TODO: Add hook for Extbase -> to handle records modified through
|
|
|
|
// Frontend and backend modules not using datahandler
|
|
|
|
|
2018-10-17 15:54:54 +02:00
|
|
|
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
2016-12-09 13:19:35 +01:00
|
|
|
$GLOBALS['TYPO3_CONF_VARS'],
|
|
|
|
[
|
|
|
|
'SC_OPTIONS' => [
|
|
|
|
'extbase' => [
|
|
|
|
'commandControllers' => [
|
2017-07-06 23:48:47 +02:00
|
|
|
Codappix\SearchCore\Command\IndexCommandController::class,
|
2016-12-09 13:19:35 +01:00
|
|
|
],
|
|
|
|
],
|
2016-12-13 16:43:51 +01:00
|
|
|
't3lib/class.t3lib_tcemain.php' => [
|
2018-03-08 20:43:30 +01:00
|
|
|
'clearCachePostProc' => [
|
|
|
|
$extensionKey => \Codappix\SearchCore\Hook\DataHandler::class . '->clearCachePostProc',
|
|
|
|
],
|
2016-12-13 16:43:51 +01:00
|
|
|
'processCmdmapClass' => [
|
2017-07-07 16:14:41 +02:00
|
|
|
$extensionKey => \Codappix\SearchCore\Hook\DataHandler::class,
|
2016-12-13 16:43:51 +01:00
|
|
|
],
|
|
|
|
'processDatamapClass' => [
|
2017-07-07 16:14:41 +02:00
|
|
|
$extensionKey => \Codappix\SearchCore\Hook\DataHandler::class,
|
2016-12-13 16:43:51 +01:00
|
|
|
],
|
|
|
|
],
|
2016-12-09 13:19:35 +01:00
|
|
|
],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
|
2017-07-06 23:48:47 +02:00
|
|
|
'Codappix.' . $extensionKey,
|
2016-12-09 13:19:35 +01:00
|
|
|
'search',
|
2017-10-29 11:32:21 +01:00
|
|
|
[
|
|
|
|
'Search' => 'search'
|
|
|
|
],
|
2016-12-09 13:19:35 +01:00
|
|
|
[
|
|
|
|
'Search' => 'search'
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
2019-05-17 17:27:55 +02:00
|
|
|
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
|
|
|
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
|
|
|
|
)->get($extensionKey);
|
2018-10-30 11:13:56 +01:00
|
|
|
|
2018-02-22 20:49:25 +01:00
|
|
|
if ($extensionConfiguration === false
|
2018-10-18 15:21:25 +02:00
|
|
|
|| !isset($extensionConfiguration['disable']['elasticsearch'])
|
|
|
|
|| $extensionConfiguration['disable']['elasticsearch'] !== '1'
|
2018-02-22 20:49:25 +01:00
|
|
|
) {
|
2018-03-14 20:23:04 +01:00
|
|
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class)
|
|
|
|
->registerImplementation(
|
|
|
|
\Codappix\SearchCore\Connection\ConnectionInterface::class,
|
|
|
|
\Codappix\SearchCore\Connection\Elasticsearch::class
|
|
|
|
);
|
2018-02-22 20:49:25 +01:00
|
|
|
}
|
2016-12-09 13:19:35 +01:00
|
|
|
},
|
|
|
|
$_EXTKEY
|
|
|
|
);
|