diff --git a/module/Enseignement/src/View/Helper/EnseignementSaisieFormViewHelper.php b/module/Enseignement/src/View/Helper/EnseignementSaisieFormViewHelper.php index eea93656d52ed6077acffcca255f0783ec9d7c18..57539df2f078ff24408f1334817c02996cb9fc83 100755 --- a/module/Enseignement/src/View/Helper/EnseignementSaisieFormViewHelper.php +++ b/module/Enseignement/src/View/Helper/EnseignementSaisieFormViewHelper.php @@ -219,11 +219,17 @@ class EnseignementSaisieFormViewHelper extends AbstractHtmlElement $element = $fieldset->getObject()->getService()->getElementPedagogique(); if ($element) { $typesIntervention = $element->getTypeIntervention(); + $typesIntervention->getValues(); // Retourne un tableau des éléments + $elements = $typesIntervention->toArray(); // Copie en tableau + usort($elements, function ($a, $b) { + return $a->getOrdre() <=> $b->getOrdre(); + }); } else { $qb = $this->getServiceTypeIntervention()->finderByHistorique(); $this->getServiceTypeIntervention()->finderByContext($qb); $this->getServiceTypeIntervention()->finderByVisibleExterieur(true, $qb); $typesIntervention = $this->getServiceTypeIntervention()->getList($qb); + } $res = $this->getView()->formHidden($fieldset->get('service'));