TASK: Refactor column value in own method

This allows to replace this single part of code in own implementations.
This commit is contained in:
Daniel Siepmann 2018-09-05 13:42:13 +02:00
parent 085f782a77
commit 244b0d9b12
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -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']
) ?? '';
}
} }