Loading module/HDR/src/HDR/Entity/Db/HDR.php +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,13 @@ class HDR implements HistoriqueAwareInterface, HasHorodatagesInterface, Resource self::ETAT_SOUTENANCE_PROGRAMMEE ]; public const ETATS_TOUS = [ self::ETAT_EN_COURS, self::ETAT_SOUTENANCE_PROGRAMMEE, self::ETAT_SOUTENUE, self::ETAT_ABANDONNEE, ]; public static array $etatsLibelles = [ self::ETAT_EN_COURS => "En cours", self::ETAT_SOUTENANCE_PROGRAMMEE => "Soutenance programmée", Loading module/Soutenance/src/Soutenance/Entity/Etat.php +18 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ class Etat implements HistoriqueAwareInterface, SearchFilterValueInterface private $code; /** @var string */ private $libelle; /** @var int */ private $ordre; /** * @return int Loading Loading @@ -68,6 +70,22 @@ class Etat implements HistoriqueAwareInterface, SearchFilterValueInterface return $this; } /** * @return int */ public function getOrdre(): int { return $this->ordre; } /** * @param int $ordre */ public function setOrdre(int $ordre): void { $this->ordre = $ordre; } /** * @inheritDoc */ Loading module/Soutenance/src/Soutenance/Entity/Mapping/Soutenance.Entity.Etat.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ <field name="code" type="string" length="64" column="code" nullable="false"/> <field name="libelle" type="string" length="256" column="libelle" nullable="false"/> <field name="ordre" type="integer" column="ordre" nullable="false" /> <!-- HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> Loading module/Soutenance/src/Soutenance/Search/Proposition/estTerminee/EstTermineeSearchFilter.php 0 → 100644 +45 −0 Original line number Diff line number Diff line <?php namespace Soutenance\Search\Proposition\estTerminee; use Doctrine\ORM\QueryBuilder; use UnicaenSearch\Filter\CheckboxSearchFilter; /** * Filtre de type case à cocher dont le fonctionnement est le suivant : * - s'il est décoché : n'ajoute rien au query builder. * - s'il est coché : ajoute au query builder une clause écartant les propositions dont la thèse/HDR est en cours ; */ class EstTermineeSearchFilter extends CheckboxSearchFilter { public const NAME = 'estTerminee'; protected string $name = self::NAME; protected string $label = "Soutenances terminées incluses"; /** @var string Le préfixe d'alias de l'entité dans le QueryBuilder (ex: "hdr", "these") */ protected string $entityAlias; /** @var string Le nom du champ à filtrer (ex: "etatHDR", "etatThese") */ protected string $stateField = 'etatThese'; /** @var array les états sur lesquels filtrer */ protected array $etats = []; public function __construct(string $entityAlias = 'these', string $stateField = 'etatThese', array $etats = []) { parent::__construct(); $this->entityAlias = $entityAlias; $this->stateField = $stateField; $this->etats = $etats; } public function applyToQueryBuilder(QueryBuilder $qb): void { if ($this->getValue()) { $field = "{$this->entityAlias}.{$this->stateField}"; $qb->andWhere("$field in (:$this->stateField)")->setParameter($this->stateField, $this->etats); } } } No newline at end of file module/Soutenance/src/Soutenance/Search/Proposition/estTerminee/EstTermineeSearchFilterAwareTrait.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Soutenance\Search\Proposition\estTerminee; trait EstTermineeSearchFilterAwareTrait { protected ?EstTermineeSearchFilter $estTermineeSearchFilter = null; public function getEstTermineeSearchFilter(string $entityAlias = 'these', string $stateField = 'etatThese', array $etats = []): EstTermineeSearchFilter { if ($this->estTermineeSearchFilter === null) { $this->estTermineeSearchFilter = new EstTermineeSearchFilter($entityAlias, $stateField, $etats); } return $this->estTermineeSearchFilter; } public function setEstTermineeSearchFilter(EstTermineeSearchFilter $estTermineeSearchFilter): void { $this->estTermineeSearchFilter = $estTermineeSearchFilter; } } No newline at end of file Loading
module/HDR/src/HDR/Entity/Db/HDR.php +7 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,13 @@ class HDR implements HistoriqueAwareInterface, HasHorodatagesInterface, Resource self::ETAT_SOUTENANCE_PROGRAMMEE ]; public const ETATS_TOUS = [ self::ETAT_EN_COURS, self::ETAT_SOUTENANCE_PROGRAMMEE, self::ETAT_SOUTENUE, self::ETAT_ABANDONNEE, ]; public static array $etatsLibelles = [ self::ETAT_EN_COURS => "En cours", self::ETAT_SOUTENANCE_PROGRAMMEE => "Soutenance programmée", Loading
module/Soutenance/src/Soutenance/Entity/Etat.php +18 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ class Etat implements HistoriqueAwareInterface, SearchFilterValueInterface private $code; /** @var string */ private $libelle; /** @var int */ private $ordre; /** * @return int Loading Loading @@ -68,6 +70,22 @@ class Etat implements HistoriqueAwareInterface, SearchFilterValueInterface return $this; } /** * @return int */ public function getOrdre(): int { return $this->ordre; } /** * @param int $ordre */ public function setOrdre(int $ordre): void { $this->ordre = $ordre; } /** * @inheritDoc */ Loading
module/Soutenance/src/Soutenance/Entity/Mapping/Soutenance.Entity.Etat.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ <field name="code" type="string" length="64" column="code" nullable="false"/> <field name="libelle" type="string" length="256" column="libelle" nullable="false"/> <field name="ordre" type="integer" column="ordre" nullable="false" /> <!-- HISTORISATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <field name="histoCreation" type="datetime" column="histo_creation" nullable="false"/> Loading
module/Soutenance/src/Soutenance/Search/Proposition/estTerminee/EstTermineeSearchFilter.php 0 → 100644 +45 −0 Original line number Diff line number Diff line <?php namespace Soutenance\Search\Proposition\estTerminee; use Doctrine\ORM\QueryBuilder; use UnicaenSearch\Filter\CheckboxSearchFilter; /** * Filtre de type case à cocher dont le fonctionnement est le suivant : * - s'il est décoché : n'ajoute rien au query builder. * - s'il est coché : ajoute au query builder une clause écartant les propositions dont la thèse/HDR est en cours ; */ class EstTermineeSearchFilter extends CheckboxSearchFilter { public const NAME = 'estTerminee'; protected string $name = self::NAME; protected string $label = "Soutenances terminées incluses"; /** @var string Le préfixe d'alias de l'entité dans le QueryBuilder (ex: "hdr", "these") */ protected string $entityAlias; /** @var string Le nom du champ à filtrer (ex: "etatHDR", "etatThese") */ protected string $stateField = 'etatThese'; /** @var array les états sur lesquels filtrer */ protected array $etats = []; public function __construct(string $entityAlias = 'these', string $stateField = 'etatThese', array $etats = []) { parent::__construct(); $this->entityAlias = $entityAlias; $this->stateField = $stateField; $this->etats = $etats; } public function applyToQueryBuilder(QueryBuilder $qb): void { if ($this->getValue()) { $field = "{$this->entityAlias}.{$this->stateField}"; $qb->andWhere("$field in (:$this->stateField)")->setParameter($this->stateField, $this->etats); } } } No newline at end of file
module/Soutenance/src/Soutenance/Search/Proposition/estTerminee/EstTermineeSearchFilterAwareTrait.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Soutenance\Search\Proposition\estTerminee; trait EstTermineeSearchFilterAwareTrait { protected ?EstTermineeSearchFilter $estTermineeSearchFilter = null; public function getEstTermineeSearchFilter(string $entityAlias = 'these', string $stateField = 'etatThese', array $etats = []): EstTermineeSearchFilter { if ($this->estTermineeSearchFilter === null) { $this->estTermineeSearchFilter = new EstTermineeSearchFilter($entityAlias, $stateField, $etats); } return $this->estTermineeSearchFilter; } public function setEstTermineeSearchFilter(EstTermineeSearchFilter $estTermineeSearchFilter): void { $this->estTermineeSearchFilter = $estTermineeSearchFilter; } } No newline at end of file