mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-03 12:39:42 +00:00
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:
@@ -36,7 +36,7 @@ final readonly class SubjectConverterManager implements SubjectConverterManagerI
|
||||
}
|
||||
|
||||
if ($converter->supportsConvert($subject)) {
|
||||
return $converter->convert($subject);
|
||||
return $converter->convert($subject, $includeAssociated);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user