mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 21:36:10 +01:00
TASK: Resolve relations always to array
Do not resolve to empty string but array to allow same handling for all relations.
This commit is contained in:
parent
646285b8b5
commit
56ce88b005
1 changed files with 4 additions and 7 deletions
|
@ -20,13 +20,10 @@ namespace Codappix\SearchCore\Domain\Index\TcaIndexer;
|
||||||
* 02110-1301, USA.
|
* 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
|
||||||
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
||||||
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
|
||||||
|
|
||||||
use TYPO3\CMS\Backend\Form\FormDataCompiler;
|
use TYPO3\CMS\Backend\Form\FormDataCompiler;
|
||||||
use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
|
use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
|
||||||
|
use TYPO3\CMS\Core\SingletonInterface as Singleton;
|
||||||
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves relations from TCA using TCA.
|
* Resolves relations from TCA using TCA.
|
||||||
|
@ -81,7 +78,7 @@ class RelationResolver implements Singleton
|
||||||
protected function resolveValue($value, array $tcaColumn)
|
protected function resolveValue($value, array $tcaColumn)
|
||||||
{
|
{
|
||||||
if ($value === '' || $value === '0') {
|
if ($value === '' || $value === '0') {
|
||||||
return '';
|
return [];
|
||||||
}
|
}
|
||||||
if ($tcaColumn['config']['type'] === 'select') {
|
if ($tcaColumn['config']['type'] === 'select') {
|
||||||
return $this->resolveSelectValue($value, $tcaColumn);
|
return $this->resolveSelectValue($value, $tcaColumn);
|
||||||
|
@ -93,7 +90,7 @@ class RelationResolver implements Singleton
|
||||||
return $this->resolveInlineValue($tcaColumn);
|
return $this->resolveInlineValue($tcaColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
return '';
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue