Loading module/Application/src/Application/Controller/SubstitutionController.php +2 −2 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class SubstitutionController extends AbstractController public function creerAction() { $type = $this->params()->fromRoute('type'); $structures = $this->getStructureService()->getStructuresSubstituableByType($type); $structures = $this->getStructureService()->getStructuresSubstituablesByType($type); $request = $this->getRequest(); if ($request->isPost()) { Loading Loading @@ -114,7 +114,7 @@ class SubstitutionController extends AbstractController } $type=$structureCible->getTypeStructure(); $structures = $this->getStructureService()->getStructuresSubstituableByType($type); $structures = $this->getStructureService()->getStructuresSubstituablesByType($type); $request = $this->getRequest(); if ($request->isPost()) { Loading module/Application/src/Application/Service/Structure/StructureService.php +22 −4 Changes for module/Application/src/Application/Service/Structure/StructureService.php: 22 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -561,11 +561,11 @@ class StructureService extends BaseService return $entity; } /** /** Les structures qui peuvent être substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresSubstituableByType($type) public function getStructuresSubstituablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') Loading @@ -579,8 +579,11 @@ class StructureService extends BaseService return $result; } /** Les structures non substituées */ public function getStructuresUtilisablesByType($type) { /** Les structures non substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresNonSubstitueesUtilisablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') ->leftJoin('structure.structureSubstituante', 'substitutionTo') Loading @@ -591,6 +594,21 @@ class StructureService extends BaseService return $result; } /** Les structures non substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresSubstitueesUtilisablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') ->leftJoin('structure.structuresSubstituees', 'substitutionFrom') ->andWhere('substitutionFrom.id IS NULL') ; $result = $qb->getQuery()->getResult(); return $result; } /** * @param TypeStructure $type * @param int $structureId Loading module/Application/src/Application/Service/These/TheseRechercheService.php +2 −2 Changes for module/Application/src/Application/Service/These/TheseRechercheService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -501,7 +501,7 @@ class TheseRechercheService private function fetchEcolesDoctoralesOptions() { $eds = $this->getStructureService()->getStructuresUtilisablesByType(TypeStructure::CODE_ECOLE_DOCTORALE); $eds = $this->getStructureService()->getStructuresNonSubstitueesUtilisablesByType(TypeStructure::CODE_ECOLE_DOCTORALE); $options = []; foreach ($eds as $ed) { Loading @@ -516,7 +516,7 @@ class TheseRechercheService private function fetchUnitesRecherchesOptions() { $urs = $this->getStructureService()->getStructuresUtilisablesByType(TypeStructure::CODE_UNITE_RECHERCHE); $urs = $this->getStructureService()->getStructuresNonSubstitueesUtilisablesByType(TypeStructure::CODE_UNITE_RECHERCHE); $options = []; foreach ($urs as $ur) { Loading Loading
module/Application/src/Application/Controller/SubstitutionController.php +2 −2 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class SubstitutionController extends AbstractController public function creerAction() { $type = $this->params()->fromRoute('type'); $structures = $this->getStructureService()->getStructuresSubstituableByType($type); $structures = $this->getStructureService()->getStructuresSubstituablesByType($type); $request = $this->getRequest(); if ($request->isPost()) { Loading Loading @@ -114,7 +114,7 @@ class SubstitutionController extends AbstractController } $type=$structureCible->getTypeStructure(); $structures = $this->getStructureService()->getStructuresSubstituableByType($type); $structures = $this->getStructureService()->getStructuresSubstituablesByType($type); $request = $this->getRequest(); if ($request->isPost()) { Loading
module/Application/src/Application/Service/Structure/StructureService.php +22 −4 Changes for module/Application/src/Application/Service/Structure/StructureService.php: 22 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -561,11 +561,11 @@ class StructureService extends BaseService return $entity; } /** /** Les structures qui peuvent être substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresSubstituableByType($type) public function getStructuresSubstituablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') Loading @@ -579,8 +579,11 @@ class StructureService extends BaseService return $result; } /** Les structures non substituées */ public function getStructuresUtilisablesByType($type) { /** Les structures non substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresNonSubstitueesUtilisablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') ->leftJoin('structure.structureSubstituante', 'substitutionTo') Loading @@ -591,6 +594,21 @@ class StructureService extends BaseService return $result; } /** Les structures non substituées * @param TypeStructure $type * @return StructureConcreteInterface[] */ public function getStructuresSubstitueesUtilisablesByType($type) { $qb = $this->getEntityManager()->getRepository($this->getEntityByType($type))->createQueryBuilder('structureConcrete') ->join('structureConcrete.structure', 'structure') ->leftJoin('structure.structuresSubstituees', 'substitutionFrom') ->andWhere('substitutionFrom.id IS NULL') ; $result = $qb->getQuery()->getResult(); return $result; } /** * @param TypeStructure $type * @param int $structureId Loading
module/Application/src/Application/Service/These/TheseRechercheService.php +2 −2 Changes for module/Application/src/Application/Service/These/TheseRechercheService.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -501,7 +501,7 @@ class TheseRechercheService private function fetchEcolesDoctoralesOptions() { $eds = $this->getStructureService()->getStructuresUtilisablesByType(TypeStructure::CODE_ECOLE_DOCTORALE); $eds = $this->getStructureService()->getStructuresNonSubstitueesUtilisablesByType(TypeStructure::CODE_ECOLE_DOCTORALE); $options = []; foreach ($eds as $ed) { Loading @@ -516,7 +516,7 @@ class TheseRechercheService private function fetchUnitesRecherchesOptions() { $urs = $this->getStructureService()->getStructuresUtilisablesByType(TypeStructure::CODE_UNITE_RECHERCHE); $urs = $this->getStructureService()->getStructuresNonSubstitueesUtilisablesByType(TypeStructure::CODE_UNITE_RECHERCHE); $options = []; foreach ($urs as $ur) { Loading