Refactored EntityURL generator.

This commit is contained in:
Jan Böhmer 2019-09-08 14:23:49 +02:00
parent c3fd325645
commit c8bc5d5214
2 changed files with 94 additions and 182 deletions

View file

@ -126,7 +126,11 @@ class PartsDataTable implements DataTableTypeInterface
->add('name', TextColumn::class, [
'label' => $this->translator->trans('part.table.name'),
'render' => function ($value, Part $context) {
return $this->urlGenerator->infoHTML($context);
return sprintf(
'<a href="%s">%s</a>',
$this->urlGenerator->infoURL($context),
$context->getName()
);
},
])
->add('id', TextColumn::class, [