Loading module/Application/config/others/structure.config.php +10 Changes for module/Application/config/others/structure.config.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ return [ 'controller' => StructureController::class, 'action' => [ 'individu-role', 'generer-roles-defauts', ], 'privileges' => EtablissementPrivileges::ETABLISSEMENT_CONSULTATION, ], Loading Loading @@ -53,6 +54,15 @@ return [ ], ], ], 'generer-roles-defauts' => [ 'type' => Segment::class, 'options' => [ 'route' => '/generer-roles-defauts/:id/:type', 'defaults' => [ 'action' => 'generer-roles-defauts', ], ], ], ], ], ], Loading module/Application/src/Application/Controller/Factory/StructureControllerFactory.php +12 Changes for module/Application/src/Application/Controller/Factory/StructureControllerFactory.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,9 +3,12 @@ namespace Application\Controller\Factory; use Application\Controller\StructureController; use Application\Service\EcoleDoctorale\EcoleDoctoraleService; use Application\Service\Etablissement\EtablissementService; use Application\Service\Individu\IndividuService; use Application\Service\Role\RoleService; use Application\Service\Structure\StructureService; use Application\Service\UniteRecherche\UniteRechercheService; use Zend\Mvc\Controller\ControllerManager; class StructureControllerFactory Loading @@ -24,16 +27,25 @@ class StructureControllerFactory * @var IndividuService $individuService * @var RoleService $roleService * @var StructureService $structureService * @var EcoleDoctoraleService $ecoleService * @var UniteRechercheService $uniteService * @var EtablissementService $etablissementService */ $individuService = $sl->get('IndividuService'); $roleService = $sl->get('RoleService'); $structureService = $sl->get('StructureService'); $ecoleService = $sl->get('EcoleDoctoraleService'); $uniteService = $sl->get('UniteRechercheService'); $etablissementService = $sl->get('EtablissementService'); $controller = new StructureController(); $controller->setIndividuService($individuService); $controller->setRoleService($roleService); $controller->setStructureService($structureService); $controller->setEcoleDoctoraleService($ecoleService); $controller->setUniteRechercheService($uniteService); $controller->setEtablissementService($etablissementService); return $controller; } Loading module/Application/src/Application/Controller/StructureController.php +35 Changes for module/Application/src/Application/Controller/StructureController.php: 35 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,13 @@ namespace Application\Controller; use Application\Entity\Db\IndividuRole; use Application\Entity\Db\Role; use Application\Entity\Db\TypeStructure; use Application\Service\EcoleDoctorale\EcoleDoctoraleServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Individu\IndividuServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\UniteRecherche\UniteRechercheServiceAwareTrait; use Zend\View\Model\ViewModel; class StructureController extends AbstractController Loading @@ -14,6 +18,9 @@ class StructureController extends AbstractController use RoleServiceAwareTrait; use IndividuServiceAwareTrait; use StructureServiceAwareTrait; use EcoleDoctoraleServiceAwareTrait; use UniteRechercheServiceAwareTrait; use EtablissementServiceAwareTrait; public function individuRoleAction() { Loading Loading @@ -57,4 +64,32 @@ class StructureController extends AbstractController 'type' => $type, ]); } /** * @throws \Doctrine\ORM\OptimisticLockException */ public function genererRolesDefautsAction() { $id = $this->params()->fromRoute('id'); $type = $this->params()->fromRoute('type'); switch($type) { case TypeStructure::CODE_ECOLE_DOCTORALE : $ecole = $this->getEcoleDoctoraleService()->getEcoleDoctoraleByStructureId($id); $this->getRoleService()->addRoleByStructure($ecole); $this->redirect()->toRoute('ecole-doctorale', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_UNITE_RECHERCHE : $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_ETABLISSEMENT : $unite = $this->getEtablissementService()->getEtablissementByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('etablissement', [], ['query' => ['selected' => $id]]); break; } } } No newline at end of file module/Application/src/Application/Controller/TheseController.php +1 Changes for module/Application/src/Application/Controller/TheseController.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1399,6 +1399,7 @@ class TheseController extends AbstractController //message de notification dans la page $message = "Les points de vigilance viennent d'être sauvegardés."; $this->flashMessenger()->addSuccessMessage($message); $this->redirect()->toRoute('these/points-de-vigilance', ["these" => $these->getId()]); } } } Loading module/Application/src/Application/Service/EcoleDoctorale/EcoleDoctoraleServiceAwareTrait.php +4 Changes for module/Application/src/Application/Service/EcoleDoctorale/EcoleDoctoraleServiceAwareTrait.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,4 +16,8 @@ trait EcoleDoctoraleServiceAwareTrait { $this->ecoleDoctoraleService = $ecoleDoctoraleService; } public function getEcoleDoctoraleService() { return $this->ecoleDoctoraleService; } } No newline at end of file Loading
module/Application/config/others/structure.config.php +10 Changes for module/Application/config/others/structure.config.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ return [ 'controller' => StructureController::class, 'action' => [ 'individu-role', 'generer-roles-defauts', ], 'privileges' => EtablissementPrivileges::ETABLISSEMENT_CONSULTATION, ], Loading Loading @@ -53,6 +54,15 @@ return [ ], ], ], 'generer-roles-defauts' => [ 'type' => Segment::class, 'options' => [ 'route' => '/generer-roles-defauts/:id/:type', 'defaults' => [ 'action' => 'generer-roles-defauts', ], ], ], ], ], ], Loading
module/Application/src/Application/Controller/Factory/StructureControllerFactory.php +12 Changes for module/Application/src/Application/Controller/Factory/StructureControllerFactory.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,9 +3,12 @@ namespace Application\Controller\Factory; use Application\Controller\StructureController; use Application\Service\EcoleDoctorale\EcoleDoctoraleService; use Application\Service\Etablissement\EtablissementService; use Application\Service\Individu\IndividuService; use Application\Service\Role\RoleService; use Application\Service\Structure\StructureService; use Application\Service\UniteRecherche\UniteRechercheService; use Zend\Mvc\Controller\ControllerManager; class StructureControllerFactory Loading @@ -24,16 +27,25 @@ class StructureControllerFactory * @var IndividuService $individuService * @var RoleService $roleService * @var StructureService $structureService * @var EcoleDoctoraleService $ecoleService * @var UniteRechercheService $uniteService * @var EtablissementService $etablissementService */ $individuService = $sl->get('IndividuService'); $roleService = $sl->get('RoleService'); $structureService = $sl->get('StructureService'); $ecoleService = $sl->get('EcoleDoctoraleService'); $uniteService = $sl->get('UniteRechercheService'); $etablissementService = $sl->get('EtablissementService'); $controller = new StructureController(); $controller->setIndividuService($individuService); $controller->setRoleService($roleService); $controller->setStructureService($structureService); $controller->setEcoleDoctoraleService($ecoleService); $controller->setUniteRechercheService($uniteService); $controller->setEtablissementService($etablissementService); return $controller; } Loading
module/Application/src/Application/Controller/StructureController.php +35 Changes for module/Application/src/Application/Controller/StructureController.php: 35 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -4,9 +4,13 @@ namespace Application\Controller; use Application\Entity\Db\IndividuRole; use Application\Entity\Db\Role; use Application\Entity\Db\TypeStructure; use Application\Service\EcoleDoctorale\EcoleDoctoraleServiceAwareTrait; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Individu\IndividuServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Application\Service\Structure\StructureServiceAwareTrait; use Application\Service\UniteRecherche\UniteRechercheServiceAwareTrait; use Zend\View\Model\ViewModel; class StructureController extends AbstractController Loading @@ -14,6 +18,9 @@ class StructureController extends AbstractController use RoleServiceAwareTrait; use IndividuServiceAwareTrait; use StructureServiceAwareTrait; use EcoleDoctoraleServiceAwareTrait; use UniteRechercheServiceAwareTrait; use EtablissementServiceAwareTrait; public function individuRoleAction() { Loading Loading @@ -57,4 +64,32 @@ class StructureController extends AbstractController 'type' => $type, ]); } /** * @throws \Doctrine\ORM\OptimisticLockException */ public function genererRolesDefautsAction() { $id = $this->params()->fromRoute('id'); $type = $this->params()->fromRoute('type'); switch($type) { case TypeStructure::CODE_ECOLE_DOCTORALE : $ecole = $this->getEcoleDoctoraleService()->getEcoleDoctoraleByStructureId($id); $this->getRoleService()->addRoleByStructure($ecole); $this->redirect()->toRoute('ecole-doctorale', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_UNITE_RECHERCHE : $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_ETABLISSEMENT : $unite = $this->getEtablissementService()->getEtablissementByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('etablissement', [], ['query' => ['selected' => $id]]); break; } } } No newline at end of file
module/Application/src/Application/Controller/TheseController.php +1 Changes for module/Application/src/Application/Controller/TheseController.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1399,6 +1399,7 @@ class TheseController extends AbstractController //message de notification dans la page $message = "Les points de vigilance viennent d'être sauvegardés."; $this->flashMessenger()->addSuccessMessage($message); $this->redirect()->toRoute('these/points-de-vigilance', ["these" => $these->getId()]); } } } Loading
module/Application/src/Application/Service/EcoleDoctorale/EcoleDoctoraleServiceAwareTrait.php +4 Changes for module/Application/src/Application/Service/EcoleDoctorale/EcoleDoctoraleServiceAwareTrait.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -16,4 +16,8 @@ trait EcoleDoctoraleServiceAwareTrait { $this->ecoleDoctoraleService = $ecoleDoctoraleService; } public function getEcoleDoctoraleService() { return $this->ecoleDoctoraleService; } } No newline at end of file