mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 16:16:12 +01:00
Merge pull request #160 from Codappix/feature/refactor-column-value-in-own-method
TASK: Refactor column value in own method
This commit is contained in:
commit
07cd4a6013
1 changed files with 13 additions and 8 deletions
|
@ -41,14 +41,7 @@ class RelationResolver implements Singleton
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$record[$column] = GeneralUtility::makeInstance($this->getUtilityForMode())
|
$record[$column] = $this->getColumnValue($record, $column, $service);
|
||||||
::getProcessedValueExtra(
|
|
||||||
$service->getTableName(),
|
|
||||||
$column,
|
|
||||||
$record[$column],
|
|
||||||
0,
|
|
||||||
$record['uid']
|
|
||||||
);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$config = $service->getColumnConfig($column);
|
$config = $service->getColumnConfig($column);
|
||||||
|
@ -107,4 +100,16 @@ class RelationResolver implements Singleton
|
||||||
|
|
||||||
return FrontendUtility::class;
|
return FrontendUtility::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getColumnValue(array $record, string $column, TcaTableServiceInterface $service): string
|
||||||
|
{
|
||||||
|
$utility = GeneralUtility::makeInstance($this->getUtilityForMode());
|
||||||
|
return $utility::getProcessedValueExtra(
|
||||||
|
$service->getTableName(),
|
||||||
|
$column,
|
||||||
|
$record[$column],
|
||||||
|
0,
|
||||||
|
$record['uid']
|
||||||
|
) ?? '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue