adjust rendering of closing motive: indicate if isCanceledAccompanyingPeriod

This commit is contained in:
Julie Lenaerts 2023-09-18 15:17:26 +02:00
parent 9b061eeaae
commit 05e86a3360

View File

@ -62,6 +62,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
private function renderStringRecursive(ClosingMotive $motive, string $existing, array $options)
{
$newExisting = $this->translatableStringHelper->localize($motive->getName());
$isCancled = $motive->getIsCanceledAccompanyingPeriod() ? '( Annule le parcours )' : '';
if ($motive->hasParent()) {
if ('' !== $existing) {
@ -70,7 +71,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
return $this->renderStringRecursive(
$motive->getParent(),
$newExisting,
$newExisting . ' ' . $isCancled,
$options
);
}
@ -79,6 +80,6 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
return $newExisting . self::SEPARATOR . $existing;
}
return $newExisting;
return $newExisting . ' ' . $isCancled;
}
}