Commit 18b5304c authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout et usage du tag estInscription

parent fcf82ef8
Loading
Loading
Loading
Loading
+1 −0
Changes for doc/release-notes/MEL_logo/change.sql: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -13,3 +13,4 @@ alter table STRUCTURE add EMAIL varchar2(256)
alter table STRUCTURE add SITE_WEB varchar2(256)
/

alter table ETABLISSEMENT add EST_ETAB_INSCRIPTION NUMBER default 0 not null;
 No newline at end of file
+23 −0
Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 23 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,6 +43,11 @@ class Etablissement implements StructureConcreteInterface, HistoriqueAwareInterf
     */
    protected $estAssocie = false;

    /**
     * @var bool
     */
    protected $estInscription = false;

    /**
     * @var bool
     */
@@ -199,6 +204,24 @@ class Etablissement implements StructureConcreteInterface, HistoriqueAwareInterf
        return $this;
    }

    /**
     * @return bool
     */
    public function estInscription()
    {
        return $this->estInscription;
    }

    /**
     * @param bool $estInscription
     * @return Etablissement
     */
    public function setEstInscription($estInscription)
    {
        $this->estInscription = $estInscription;
        return $this;
    }

    /**
     * @return bool
     */
+1 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Etablissement.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
        <field name="domaine"   type="string"   length="50"  column="DOMAINE"   nullable="true"/>
        <field name="estMembre"  type="boolean" column="EST_MEMBRE" nullable="false"/>
        <field name="estAssocie" type="boolean" column="EST_ASSOCIE" nullable="false"/>
        <field name="estInscription" type="boolean" column="EST_ETAB_INSCRIPTION" nullable="false"/>
        <field name="estComue" type="boolean" column="EST_COMUE"/>

        <one-to-many field="theses"         target-entity="Application\Entity\Db\These"     mapped-by="etablissement"/>
+15 −0
Changes for module/Application/src/Application/Entity/Db/Repository/EtablissementRepository.php: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -217,4 +217,19 @@ class EtablissementRepository extends DefaultEntityRepository

        return  $qb->getQuery()->getResult();
    }

    /**
     * @return Etablissement[]
     */
    public function findAllEtablissementsInscriptions()
    {
        $qb = $this->createQueryBuilder("e")
            ->addSelect("s")
            ->join("e.structure", "s")
            ->andWhere("e.estInscription = 1")
            ->orderBy('s.libelle')
        ;

        return  $qb->getQuery()->getResult();
    }
}
 No newline at end of file
+4 −0
Changes for module/Application/src/Application/Form/EtablissementForm.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ class EtablissementForm extends Form
            (new Checkbox('estAssocie'))
                ->setLabel("Établissement associé")
        );
        $this->add(
            (new Checkbox('estInscription'))
                ->setLabel("Établissement d'inscription")
        );
        $this->add(
            (new Checkbox('estFerme'))
                ->setLabel("Établissement fermé")
Loading