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:
Daniel Siepmann 2018-09-05 13:59:50 +02:00 committed by GitHub
commit 07cd4a6013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,14 +41,7 @@ class RelationResolver implements Singleton
continue;
}
$record[$column] = GeneralUtility::makeInstance($this->getUtilityForMode())
::getProcessedValueExtra(
$service->getTableName(),
$column,
$record[$column],
0,
$record['uid']
);
$record[$column] = $this->getColumnValue($record, $column, $service);
try {
$config = $service->getColumnConfig($column);
@ -107,4 +100,16 @@ class RelationResolver implements Singleton
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']
) ?? '';
}
}