Loading module/OffreFormation/src/Controller/OffreFormationController.php +13 −1 Changes for module/OffreFormation/src/Controller/OffreFormationController.php: 13 added lines, 1 removed line. Original line number Diff line number Diff line <?php namespace OffreFormation\Controller; use Application\Service\Traits\AnneeServiceAwareTrait; Loading Loading @@ -66,6 +67,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle if (($element = $this->params()->fromPost('element')) && isset($element['id'])) { $form->get('element')->setValue($element); } return [ 'structures' => $structures, 'niveaux' => $niveaux, Loading @@ -81,6 +83,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function exportAction () { $this->initFilters(); Loading Loading @@ -172,12 +175,14 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function administrationOffreAction () { return []; } public function reconductionAction () { $this->initFilterHistorique(); Loading Loading @@ -234,6 +239,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function reconductionCentreCoutAction () { $this->initFilterHistorique(); Loading Loading @@ -285,6 +291,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function reconductionModulateurAction () { $this->initFilterHistorique(); Loading Loading @@ -337,6 +344,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilters () { $this->initFilterAnnee(); Loading @@ -344,6 +352,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilterAnnee () { $this->em()->getFilters()->enable('annee')->init([ Loading @@ -354,6 +363,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilterHistorique () { /* Mise en place des filtres */ Loading @@ -368,18 +378,20 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function disableFilters ($name) { $this->em()->getFilters()->disable($name); } protected function getParams () { $structure = $this->context()->structureFromQuery() ? : $this->getServiceContext()->getStructure(); $niveau = $this->context()->niveauFromQuery(); $etape = $this->context()->etapeFromQuery(); if ($etape) $etape = $this->getServiceEtape()->get($etape); // entité Niveau if ($etape) $etape = $this->getServiceEtape()->get($etape->getId()); // entité Niveau if ($niveau) $niveau = $this->getServiceNiveauEtape()->get($niveau); // entité Niveau return [$structure, $niveau, $etape]; Loading Loading
module/OffreFormation/src/Controller/OffreFormationController.php +13 −1 Changes for module/OffreFormation/src/Controller/OffreFormationController.php: 13 added lines, 1 removed line. Original line number Diff line number Diff line <?php namespace OffreFormation\Controller; use Application\Service\Traits\AnneeServiceAwareTrait; Loading Loading @@ -66,6 +67,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle if (($element = $this->params()->fromPost('element')) && isset($element['id'])) { $form->get('element')->setValue($element); } return [ 'structures' => $structures, 'niveaux' => $niveaux, Loading @@ -81,6 +83,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function exportAction () { $this->initFilters(); Loading Loading @@ -172,12 +175,14 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function administrationOffreAction () { return []; } public function reconductionAction () { $this->initFilterHistorique(); Loading Loading @@ -234,6 +239,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function reconductionCentreCoutAction () { $this->initFilterHistorique(); Loading Loading @@ -285,6 +291,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } public function reconductionModulateurAction () { $this->initFilterHistorique(); Loading Loading @@ -337,6 +344,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilters () { $this->initFilterAnnee(); Loading @@ -344,6 +352,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilterAnnee () { $this->em()->getFilters()->enable('annee')->init([ Loading @@ -354,6 +363,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function initFilterHistorique () { /* Mise en place des filtres */ Loading @@ -368,18 +378,20 @@ class OffreFormationController extends \Application\Controller\AbstractControlle } protected function disableFilters ($name) { $this->em()->getFilters()->disable($name); } protected function getParams () { $structure = $this->context()->structureFromQuery() ? : $this->getServiceContext()->getStructure(); $niveau = $this->context()->niveauFromQuery(); $etape = $this->context()->etapeFromQuery(); if ($etape) $etape = $this->getServiceEtape()->get($etape); // entité Niveau if ($etape) $etape = $this->getServiceEtape()->get($etape->getId()); // entité Niveau if ($niveau) $niveau = $this->getServiceNiveauEtape()->get($niveau); // entité Niveau return [$structure, $niveau, $etape]; Loading