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
|
|
|
|
|
|
|
|
$GLOBALS['TYPO3_CONF_VARS'] = TYPO3\CMS\Extbase\Utility\ArrayUtility::arrayMergeRecursiveOverrule(
|
|
|
|
$GLOBALS['TYPO3_CONF_VARS'],
|
|
|
|
[
|
|
|
|
'SC_OPTIONS' => [
|
|
|
|
'extbase' => [
|
|
|
|
'commandControllers' => [
|
2017-07-06 23:53:56 +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' => [
|
|
|
|
'processCmdmapClass' => [
|
2017-07-06 23:53:56 +02:00
|
|
|
$extensionKey => '&' . \Codappix\SearchCore\Hook\DataHandler::class,
|
2016-12-13 16:43:51 +01:00
|
|
|
],
|
|
|
|
'processDatamapClass' => [
|
2017-07-06 23:53:56 +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:53:56 +02:00
|
|
|
'Codappix.' . $extensionKey,
|
2016-12-09 13:19:35 +01:00
|
|
|
'search',
|
|
|
|
[
|
|
|
|
'Search' => 'search'
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'Search' => 'search' // TODO: Enable caching. But submitting form results in previous result?!
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\Container\Container')
|
|
|
|
->registerImplementation(
|
2017-07-06 23:53:56 +02:00
|
|
|
'Codappix\SearchCore\Connection\ConnectionInterface',
|
|
|
|
'Codappix\SearchCore\Connection\Elasticsearch'
|
2016-12-09 13:19:35 +01:00
|
|
|
);
|
|
|
|
},
|
|
|
|
$_EXTKEY
|
|
|
|
);
|