Loading module/Application/src/Application/Controller/StatistiqueController.php +2 −2 Changes for module/Application/src/Application/Controller/StatistiqueController.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class StatistiqueController extends AbstractController $theses = $qb->getQuery()->execute(); $ecoles = $this->getEcoleDoctoraleService()->getRepository()->findAll(); $unites = $this->uniteRechercheService->getUnitesRecherches(); $unites = $this->getUniteRechercheService()->getRepository()->findAll(); $etablissements = $this->getEtablissementService()->getRepository()->findAll(); return new ViewModel([ 'theses' => $theses, Loading @@ -70,7 +70,7 @@ class StatistiqueController extends AbstractController return $qb->andWhere("t.ecoleDoctorale = :ed") ->setParameter(":ed", $ecole); case "UR" : $unite = $this->uniteRechercheService->getUniteRechercheById($id); $unite = $this->getUniteRechercheService()->getRepository()->find($id); return $qb->andWhere("t.uniteRecherche = :ur") ->setParameter(":ur", $unite); case "Etab" : Loading module/Application/src/Application/Controller/StructureController.php +1 −1 Changes for module/Application/src/Application/Controller/StructureController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class StructureController extends AbstractController $this->redirect()->toRoute('ecole-doctorale', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_UNITE_RECHERCHE : $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($id); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $id]]); break; Loading module/Application/src/Application/Controller/SubstitutionController.php +1 −1 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class SubstitutionController extends AbstractController $structures = $this->getEtablissementService()->getRepository()->findAll(); break; case (TypeStructure::CODE_UNITE_RECHERCHE): $structures = $this->getUniteRechercheService()->getUnitesRecherches(); $structures = $this->getUniteRechercheService()->getRepository()->findAll(); break; } Loading module/Application/src/Application/Controller/TheseController.php +2 −1 Changes for module/Application/src/Application/Controller/TheseController.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -206,7 +206,8 @@ class TheseController extends AbstractController $unite = $these->getUniteRecherche(); $rattachements = null; if ($unite !== null) $rattachements = $this->uniteRechercheService->findEtablissementRattachement($unite); if ($unite !== null) $rattachements = $this->getUniteRechercheService()->findEtablissementRattachement($unite); //TODO JP remplacer dans modifierPersopassUrl(); $urlModification = $this->url()->fromRoute('doctorant/modifier-persopass',['back' => 1, 'doctorant' => $these->getDoctorant()->getId()], [], true); Loading module/Application/src/Application/Controller/UniteRechercheController.php +18 −18 Changes for module/Application/src/Application/Controller/UniteRechercheController.php: 18 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ class UniteRechercheController extends AbstractController * @var StructureConcreteInterface $structure * @var Role[] $roles */ $selectedStructure = $this->uniteRechercheService->getUniteRechercheByStructureId($selected); $selectedStructure = $this->getUniteRechercheService()->getRepository()->findByStructureId($selected); $roles = $selectedStructure->getStructure()->getStructureDependantRoles(); $effectifs = []; Loading @@ -52,7 +52,7 @@ class UniteRechercheController extends AbstractController } } $structuresAll = $this->uniteRechercheService->getUnitesRecherches(); $structuresAll = $this->getUniteRechercheService()->getRepository()->findAll(); /** retrait des structures substituées */ //TODO faire cela dans le service ??? Loading @@ -72,7 +72,7 @@ class UniteRechercheController extends AbstractController if (!$found) $structures[] = $structure; } $rattachements = null; if ($selectedStructure !== null) $rattachements = $this->uniteRechercheService->findEtablissementRattachement($selectedStructure); if ($selectedStructure !== null) $rattachements = $this->getUniteRechercheService()->findEtablissementRattachement($selectedStructure); $domaines = null; if ($selectedStructure !== null) $domaines = $selectedStructure->getDomaines(); Loading @@ -98,7 +98,7 @@ class UniteRechercheController extends AbstractController { /** @var UniteRecherche $unite */ $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheForm->bind($unite); // si POST alors on revient du formulaire Loading @@ -125,7 +125,7 @@ class UniteRechercheController extends AbstractController } // mise à jour des données relatives aux unités de recherche $unite = $this->uniteRechercheForm->getData(); $this->uniteRechercheService->update($unite); $this->getUniteRechercheService()->update($unite); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' modifiée avec succès"); return $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $uniteId]], true); Loading Loading @@ -167,7 +167,7 @@ class UniteRechercheController extends AbstractController if ($this->uniteRechercheForm->isValid()) { /** @var UniteRecherche $unite */ $unite = $this->uniteRechercheForm->getData(); $this->uniteRechercheService->create($unite, $this->userContextService->getIdentityDb()); $this->getUniteRechercheService()->create($unite, $this->userContextService->getIdentityDb()); // sauvegarde du logo si fourni if ($file['cheminLogo']['tmp_name'] !== '') { Loading Loading @@ -196,9 +196,9 @@ class UniteRechercheController extends AbstractController public function supprimerAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->deleteSoftly($unite, $this->userContextService->getIdentityDb()); $this->getUniteRechercheService()->deleteSoftly($unite, $this->userContextService->getIdentityDb()); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' supprimée avec succès"); Loading @@ -208,9 +208,9 @@ class UniteRechercheController extends AbstractController public function restaurerAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->undelete($unite); $this->getUniteRechercheService()->undelete($unite); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' restaurée avec succès"); Loading Loading @@ -248,9 +248,9 @@ class UniteRechercheController extends AbstractController public function supprimerLogoUniteRecherche() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->deleteLogo($unite); $this->getUniteRechercheService()->deleteLogo($unite); $filename = UniteRechercheController::getLogoFilename($unite, true); if (file_exists($filename)) { $result = unlink($filename); Loading Loading @@ -281,14 +281,14 @@ class UniteRechercheController extends AbstractController if ($unite === null) { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); } $chemin = UniteRechercheController::getLogoFilename($unite, false); $filename = UniteRechercheController::getLogoFilename($unite, true); $result = rename($cheminLogoUploade, $filename); if ($result) { $this->flashMessenger()->addSuccessMessage("Le logo de l'unité de recherche {$unite->getLibelle()} vient d'être ajouté."); $this->uniteRechercheService->setLogo($unite,$chemin); $this->getUniteRechercheService()->setLogo($unite,$chemin); } else { $this->flashMessenger()->addErrorMessage("Erreur lors de l'enregistrement du logo de l'unité de recherche <strong>{$unite->getLibelle()}</strong>."); } Loading @@ -311,7 +311,7 @@ class UniteRechercheController extends AbstractController public function ajouterEtablissementRattachementAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $etablissementId = $this->params()->fromRoute("etablissement"); if ($etablissementId == 0) { Loading @@ -332,7 +332,7 @@ class UniteRechercheController extends AbstractController public function retirerEtablissementRattachementAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $etablissementId = $this->params()->fromRoute("etablissement"); $etablissement = $this->getEtablissementService()->getRepository()->find($etablissementId); Loading @@ -350,7 +350,7 @@ class UniteRechercheController extends AbstractController public function ajouterDomaineScientifiqueAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $domaineId = $this->params()->fromRoute("domaineScientifique"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $domaine = $this->getDomaineScientifiqueService()->getDomaineScientifiqueById($domaineId); if ($domaine !== null && !array_search($domaine, $unite->getDomaines())) { Loading @@ -371,7 +371,7 @@ class UniteRechercheController extends AbstractController public function retirerDomaineScientifiqueAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $domaineId = $this->params()->fromRoute("domaineScientifique"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $domaine = $this->getDomaineScientifiqueService()->getDomaineScientifiqueById($domaineId); $domaine = $domaine->removeUnite($unite); Loading Loading
module/Application/src/Application/Controller/StatistiqueController.php +2 −2 Changes for module/Application/src/Application/Controller/StatistiqueController.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ class StatistiqueController extends AbstractController $theses = $qb->getQuery()->execute(); $ecoles = $this->getEcoleDoctoraleService()->getRepository()->findAll(); $unites = $this->uniteRechercheService->getUnitesRecherches(); $unites = $this->getUniteRechercheService()->getRepository()->findAll(); $etablissements = $this->getEtablissementService()->getRepository()->findAll(); return new ViewModel([ 'theses' => $theses, Loading @@ -70,7 +70,7 @@ class StatistiqueController extends AbstractController return $qb->andWhere("t.ecoleDoctorale = :ed") ->setParameter(":ed", $ecole); case "UR" : $unite = $this->uniteRechercheService->getUniteRechercheById($id); $unite = $this->getUniteRechercheService()->getRepository()->find($id); return $qb->andWhere("t.uniteRecherche = :ur") ->setParameter(":ur", $unite); case "Etab" : Loading
module/Application/src/Application/Controller/StructureController.php +1 −1 Changes for module/Application/src/Application/Controller/StructureController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class StructureController extends AbstractController $this->redirect()->toRoute('ecole-doctorale', [], ['query' => ['selected' => $id]]); break; case TypeStructure::CODE_UNITE_RECHERCHE : $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($id); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($id); $this->getRoleService()->addRoleByStructure($unite); $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $id]]); break; Loading
module/Application/src/Application/Controller/SubstitutionController.php +1 −1 Changes for module/Application/src/Application/Controller/SubstitutionController.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -355,7 +355,7 @@ class SubstitutionController extends AbstractController $structures = $this->getEtablissementService()->getRepository()->findAll(); break; case (TypeStructure::CODE_UNITE_RECHERCHE): $structures = $this->getUniteRechercheService()->getUnitesRecherches(); $structures = $this->getUniteRechercheService()->getRepository()->findAll(); break; } Loading
module/Application/src/Application/Controller/TheseController.php +2 −1 Changes for module/Application/src/Application/Controller/TheseController.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -206,7 +206,8 @@ class TheseController extends AbstractController $unite = $these->getUniteRecherche(); $rattachements = null; if ($unite !== null) $rattachements = $this->uniteRechercheService->findEtablissementRattachement($unite); if ($unite !== null) $rattachements = $this->getUniteRechercheService()->findEtablissementRattachement($unite); //TODO JP remplacer dans modifierPersopassUrl(); $urlModification = $this->url()->fromRoute('doctorant/modifier-persopass',['back' => 1, 'doctorant' => $these->getDoctorant()->getId()], [], true); Loading
module/Application/src/Application/Controller/UniteRechercheController.php +18 −18 Changes for module/Application/src/Application/Controller/UniteRechercheController.php: 18 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ class UniteRechercheController extends AbstractController * @var StructureConcreteInterface $structure * @var Role[] $roles */ $selectedStructure = $this->uniteRechercheService->getUniteRechercheByStructureId($selected); $selectedStructure = $this->getUniteRechercheService()->getRepository()->findByStructureId($selected); $roles = $selectedStructure->getStructure()->getStructureDependantRoles(); $effectifs = []; Loading @@ -52,7 +52,7 @@ class UniteRechercheController extends AbstractController } } $structuresAll = $this->uniteRechercheService->getUnitesRecherches(); $structuresAll = $this->getUniteRechercheService()->getRepository()->findAll(); /** retrait des structures substituées */ //TODO faire cela dans le service ??? Loading @@ -72,7 +72,7 @@ class UniteRechercheController extends AbstractController if (!$found) $structures[] = $structure; } $rattachements = null; if ($selectedStructure !== null) $rattachements = $this->uniteRechercheService->findEtablissementRattachement($selectedStructure); if ($selectedStructure !== null) $rattachements = $this->getUniteRechercheService()->findEtablissementRattachement($selectedStructure); $domaines = null; if ($selectedStructure !== null) $domaines = $selectedStructure->getDomaines(); Loading @@ -98,7 +98,7 @@ class UniteRechercheController extends AbstractController { /** @var UniteRecherche $unite */ $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheForm->bind($unite); // si POST alors on revient du formulaire Loading @@ -125,7 +125,7 @@ class UniteRechercheController extends AbstractController } // mise à jour des données relatives aux unités de recherche $unite = $this->uniteRechercheForm->getData(); $this->uniteRechercheService->update($unite); $this->getUniteRechercheService()->update($unite); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' modifiée avec succès"); return $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $uniteId]], true); Loading Loading @@ -167,7 +167,7 @@ class UniteRechercheController extends AbstractController if ($this->uniteRechercheForm->isValid()) { /** @var UniteRecherche $unite */ $unite = $this->uniteRechercheForm->getData(); $this->uniteRechercheService->create($unite, $this->userContextService->getIdentityDb()); $this->getUniteRechercheService()->create($unite, $this->userContextService->getIdentityDb()); // sauvegarde du logo si fourni if ($file['cheminLogo']['tmp_name'] !== '') { Loading Loading @@ -196,9 +196,9 @@ class UniteRechercheController extends AbstractController public function supprimerAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->deleteSoftly($unite, $this->userContextService->getIdentityDb()); $this->getUniteRechercheService()->deleteSoftly($unite, $this->userContextService->getIdentityDb()); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' supprimée avec succès"); Loading @@ -208,9 +208,9 @@ class UniteRechercheController extends AbstractController public function restaurerAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->undelete($unite); $this->getUniteRechercheService()->undelete($unite); $this->flashMessenger()->addSuccessMessage("Unité de recherche '$unite' restaurée avec succès"); Loading Loading @@ -248,9 +248,9 @@ class UniteRechercheController extends AbstractController public function supprimerLogoUniteRecherche() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $this->uniteRechercheService->deleteLogo($unite); $this->getUniteRechercheService()->deleteLogo($unite); $filename = UniteRechercheController::getLogoFilename($unite, true); if (file_exists($filename)) { $result = unlink($filename); Loading Loading @@ -281,14 +281,14 @@ class UniteRechercheController extends AbstractController if ($unite === null) { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); } $chemin = UniteRechercheController::getLogoFilename($unite, false); $filename = UniteRechercheController::getLogoFilename($unite, true); $result = rename($cheminLogoUploade, $filename); if ($result) { $this->flashMessenger()->addSuccessMessage("Le logo de l'unité de recherche {$unite->getLibelle()} vient d'être ajouté."); $this->uniteRechercheService->setLogo($unite,$chemin); $this->getUniteRechercheService()->setLogo($unite,$chemin); } else { $this->flashMessenger()->addErrorMessage("Erreur lors de l'enregistrement du logo de l'unité de recherche <strong>{$unite->getLibelle()}</strong>."); } Loading @@ -311,7 +311,7 @@ class UniteRechercheController extends AbstractController public function ajouterEtablissementRattachementAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $etablissementId = $this->params()->fromRoute("etablissement"); if ($etablissementId == 0) { Loading @@ -332,7 +332,7 @@ class UniteRechercheController extends AbstractController public function retirerEtablissementRattachementAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $etablissementId = $this->params()->fromRoute("etablissement"); $etablissement = $this->getEtablissementService()->getRepository()->find($etablissementId); Loading @@ -350,7 +350,7 @@ class UniteRechercheController extends AbstractController public function ajouterDomaineScientifiqueAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $domaineId = $this->params()->fromRoute("domaineScientifique"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $domaine = $this->getDomaineScientifiqueService()->getDomaineScientifiqueById($domaineId); if ($domaine !== null && !array_search($domaine, $unite->getDomaines())) { Loading @@ -371,7 +371,7 @@ class UniteRechercheController extends AbstractController public function retirerDomaineScientifiqueAction() { $uniteId = $this->params()->fromRoute("uniteRecherche"); $domaineId = $this->params()->fromRoute("domaineScientifique"); $unite = $this->getUniteRechercheService()->getUniteRechercheByStructureId($uniteId); $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($uniteId); $domaine = $this->getDomaineScientifiqueService()->getDomaineScientifiqueById($domaineId); $domaine = $domaine->removeUnite($unite); Loading