mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 10:03:49 +00:00
show generic doc accompanying course document in person generic doc list
This commit is contained in:
@@ -40,18 +40,18 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
|
||||
public function getTemplateData(GenericDocDTO $genericDocDTO, $options = []): array
|
||||
{
|
||||
if ($genericDocDTO->linked instanceof AccompanyingPeriod) {
|
||||
if (AccompanyingCourseDocumentGenericDocProvider::KEY === $genericDocDTO->key) {
|
||||
return [
|
||||
'document' => $this->accompanyingCourseDocumentRepository->find($genericDocDTO->identifiers['id']),
|
||||
'accompanyingCourse' => $genericDocDTO->linked,
|
||||
'document' => $doc = $this->accompanyingCourseDocumentRepository->find($genericDocDTO->identifiers['id']),
|
||||
'accompanyingCourse' => $doc->getCourse(),
|
||||
'options' => $options,
|
||||
];
|
||||
}
|
||||
|
||||
// this is a person
|
||||
return [
|
||||
'document' => $this->personDocumentRepository->find($genericDocDTO->identifiers['id']),
|
||||
'person' => $genericDocDTO->linked,
|
||||
'document' => $doc = $this->personDocumentRepository->find($genericDocDTO->identifiers['id']),
|
||||
'person' => $doc->getPerson(),
|
||||
'options' => $options,
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user