mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
adjust rendering of closing motive: indicate if isCanceledAccompanyingPeriod
This commit is contained in:
parent
9b061eeaae
commit
05e86a3360
@ -62,6 +62,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
|
|||||||
private function renderStringRecursive(ClosingMotive $motive, string $existing, array $options)
|
private function renderStringRecursive(ClosingMotive $motive, string $existing, array $options)
|
||||||
{
|
{
|
||||||
$newExisting = $this->translatableStringHelper->localize($motive->getName());
|
$newExisting = $this->translatableStringHelper->localize($motive->getName());
|
||||||
|
$isCancled = $motive->getIsCanceledAccompanyingPeriod() ? '( Annule le parcours )' : '';
|
||||||
|
|
||||||
if ($motive->hasParent()) {
|
if ($motive->hasParent()) {
|
||||||
if ('' !== $existing) {
|
if ('' !== $existing) {
|
||||||
@ -70,7 +71,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
|
|||||||
|
|
||||||
return $this->renderStringRecursive(
|
return $this->renderStringRecursive(
|
||||||
$motive->getParent(),
|
$motive->getParent(),
|
||||||
$newExisting,
|
$newExisting . ' ' . $isCancled,
|
||||||
$options
|
$options
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -79,6 +80,6 @@ class ClosingMotiveRender implements ChillEntityRenderInterface
|
|||||||
return $newExisting . self::SEPARATOR . $existing;
|
return $newExisting . self::SEPARATOR . $existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $newExisting;
|
return $newExisting . ' ' . $isCancled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user