Fixed: show list of workflow, event if some accompanying course document associated to a workflow are deleted

This commit is contained in:
2022-12-14 13:52:37 +01:00
parent 58ede06dfe
commit ba261ddeb9
3 changed files with 64 additions and 49 deletions

View File

@@ -65,6 +65,10 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
{
$doc = $this->getRelatedEntity($entityWorkflow);
if (null === $doc) {
return $this->translator->trans('workflow.Document deleted');
}
return $this->translator->trans('workflow.Document (n°%doc%)', ['%doc%' => $entityWorkflow->getRelatedEntityId()])
. ' - ' . $doc->getTitle();
}