[task] migrate array utility

This commit is contained in:
Daniel Maier 2018-10-17 15:54:54 +02:00
parent 18325559ae
commit 50baec90ec
4 changed files with 8 additions and 5 deletions

View file

@ -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.

View file

@ -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

View file

@ -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
{

View file

@ -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'