mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 21:36:10 +01:00
[task] migrate array utility
This commit is contained in:
parent
18325559ae
commit
50baec90ec
4 changed files with 8 additions and 5 deletions
|
@ -21,7 +21,7 @@ namespace Codappix\SearchCore\Configuration;
|
|||
*/
|
||||
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3\CMS\Extbase\Utility\ArrayUtility;
|
||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
||||
|
||||
/**
|
||||
* Container of all configurations for extension.
|
||||
|
|
|
@ -93,7 +93,9 @@ class SearchRequest implements SearchRequestInterface
|
|||
public function setFilter(array $filter)
|
||||
{
|
||||
$filter = \TYPO3\CMS\Core\Utility\ArrayUtility::removeArrayEntryByValue($filter, '');
|
||||
$this->filter = \TYPO3\CMS\Extbase\Utility\ArrayUtility::removeEmptyElementsRecursively($filter);
|
||||
$this->filter = \TYPO3\CMS\Core\Utility\ArrayUtility::filterRecursive($filter, function ($value) {
|
||||
return !empty($value);
|
||||
});
|
||||
}
|
||||
|
||||
public function hasFilter() : bool
|
||||
|
|
|
@ -25,7 +25,7 @@ use Codappix\SearchCore\Configuration\ConfigurationUtility;
|
|||
use Codappix\SearchCore\Configuration\InvalidArgumentException;
|
||||
use Codappix\SearchCore\Connection\SearchRequestInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Utility\ArrayUtility;
|
||||
use TYPO3\CMS\Core\Utility\ArrayUtility;
|
||||
|
||||
class QueryFactory
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ call_user_func(
|
|||
// 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(
|
||||
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule(
|
||||
$GLOBALS['TYPO3_CONF_VARS'],
|
||||
[
|
||||
'SC_OPTIONS' => [
|
||||
|
@ -43,7 +43,8 @@ call_user_func(
|
|||
\Codappix\SearchCore\Compatibility\ImplementationRegistrationService::registerImplementations();
|
||||
|
||||
// API does make use of object manager, therefore use GLOBALS
|
||||
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$extensionKey]);
|
||||
$extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)->get($extensionKey);
|
||||
|
||||
if ($extensionConfiguration === false
|
||||
|| !isset($extensionConfiguration['disable.']['elasticsearch'])
|
||||
|| $extensionConfiguration['disable.']['elasticsearch'] !== '1'
|
||||
|
|
Loading…
Reference in a new issue