Add support for associated subject conversion in AccompanyingPeriodWorkSubjectConverter

- Updated `convert` method to append associated subjects when `$includeAssociated` is true.
- Modified `SubjectConverterManager` to pass `$includeAssociated` to converters during subject resolution.
This commit is contained in:
2026-02-17 09:33:04 +01:00
parent fa38f7edaa
commit 8df06504ba
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ final readonly class SubjectConverterManager implements SubjectConverterManagerI
}
if ($converter->supportsConvert($subject)) {
return $converter->convert($subject);
return $converter->convert($subject, $includeAssociated);
}
}

View File

@@ -33,6 +33,10 @@ class AccompanyingPeriodWorkSubjectConverter implements SubjectConverterInterfac
$data->append($this->subjectConverterManager->getSubjectsForEntity($person));
}
if ($includeAssociated) {
$data->append($this->subjectConverterManager->getSubjectsForEntity($subject->getAccompanyingPeriod(), false));
}
return $data;
}