Commit 37afd97c authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Début d'abandon de set/getCode des structure concrete

parent 42ae0205
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/Controller/EtablissementController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ class EtablissementController extends AbstractController
    {
        $chemin = "";
        if ($fullpath) $chemin .= Structure::PATH;
        if ($etablissement->getCode()) $chemin .= "/ressources/Logos/Etab/".$etablissement->getCode().".png";
        if ($etablissement->getStructure()->getCode()) $chemin .= "/ressources/Logos/Etab/".$etablissement->getStructure()->getCode().".png";
        else $chemin .= "/ressources/Logos/Etab/". uniqid().".png";
        return $chemin;
    }
+2 −2
Changes for module/Application/src/Application/Controller/ExportController.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -49,9 +49,9 @@ class ExportController extends AbstractController
            },
            //Structures
            'Etablissement'                         => function (These $these) { return $these->getEtablissement()->getLibelle(); },
            'Ecole Doctorale Code'                  => function (These $these) { if($these->getEcoleDoctorale() !== null)return $these->getEcoleDoctorale()->getCode(); else return null; },
            'Ecole Doctorale Code'                  => function (These $these) { if($these->getEcoleDoctorale() !== null)return $these->getEcoleDoctorale()->getStructure()->getCode(); else return null; },
            'Ecole Doctorale'                       => function (These $these) { if($these->getEcoleDoctorale() !== null)return $these->getEcoleDoctorale()->getLibelle(); else return null; },
            'Unité de Recherche Code'               => function (These $these) { if($these->getUniteRecherche() !== null) return $these->getUniteRecherche()->getCode(); else return null; },
            'Unité de Recherche Code'               => function (These $these) { if($these->getUniteRecherche() !== null) return $these->getUniteRecherche()->getStructure()->getCode(); else return null; },
            'Unité de Recherche'                    => function (These $these) { if($these->getUniteRecherche() !== null) return $these->getUniteRecherche()->getLibelle(); else return null; },
            'Etablissement Co-Tutelle'              => function (These $these) { return $these->getLibelleEtabCotutelle(); },
            'Pays Co-Tutelle'                       => function (These $these) { return $these->getLibellePaysCotutelle(); },
+1 −1
Changes for module/Application/src/Application/Controller/RoleController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ class RoleController extends AbstractController {
        $mappedRoles = [];
        foreach ($etablissementsMembres as $etablissement) {
            $roles = $this->getRoleService()->getRepository()->findAllRolesTheseDependantByEtablissement($etablissement);
            $mappedRoles[$etablissement->getCode()] = $roles;
            $mappedRoles[$etablissement->getStructure()->getCode()] = $roles;
        }
        return new ViewModel([
            'etablissements' => $etablissementsMembres,
+2 −0
Changes for module/Application/src/Application/Entity/Db/EcoleDoctorale.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ class EcoleDoctorale implements StructureConcreteInterface, HistoriqueAwareInter

    /**
     * @return string
     * @deprecated mais encore nécessaire à cause de StructureConcreteInterface
     * @see StructureConcreteInterface
     */
    public function getCode() {
        return $this->structure->getCode();
+2 −9
Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 2 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -99,21 +99,14 @@ class Etablissement implements StructureConcreteInterface, HistoriqueAwareInterf

    /**
     * @return string
     * @deprecated mais encore nécessaire à cause de StructureConcreteInterface
     * @see StructureConcreteInterface
     */
    public function getCode()
    {
        return $this->getStructure()->getCode();
    }

    /**
     * @param mixed $code
     * @deprecated
     */
    public function setCode($code)
    {
        $this->getStructure()->setCode($code);
    }

    /**
     * Set sourceCode
     *
Loading