DX: [export] review on CreatorFilter, CreatorJobAggregator, CreatorJobFilter

This commit is contained in:
2022-11-03 12:39:19 +01:00
parent d3f03fb27c
commit 03e765f811
4 changed files with 11 additions and 23 deletions

View File

@@ -62,15 +62,13 @@ class CreatorJobAggregator implements AggregatorInterface
{
return function ($value): string {
if ('_header' === $value) {
return 'Job';
return 'export.aggregator.course.by_creator_job.Creator\'s job';
}
if (null === $value) {
if (null === $value || null === $j = $this->jobRepository->find($value)) {
return '';
}
$j = $this->jobRepository->find($value);
return $this->translatableStringHelper->localize(
$j->getLabel()
);