Loading module/Lieu/src/Entity/Db/Mapping/Lieu.Entity.Db.Structure.dcm.xml +1 Changes for module/Lieu/src/Entity/Db/Mapping/Lieu.Entity.Db.Structure.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ <field name="libelleLong" type="string" column="LIBELLE_LONG" length="200" nullable="false"/> <field name="enseignement" type="boolean" column="ENSEIGNEMENT" nullable="false"/> <field name="affAdresseContrat" type="boolean" column="AFF_ADRESSE_CONTRAT" nullable="false"/> <field name="ids" type="string" column="IDS" length="1000" nullable="true"/> <field name="adressePrecisions" type="string" column="ADRESSE_PRECISIONS" length="240" nullable="true"/> <field name="adresseNumero" type="string" column="ADRESSE_NUMERO" length="4" nullable="true"/> Loading module/Lieu/src/Entity/Db/Structure.php +25 Changes for module/Lieu/src/Entity/Db/Structure.php: 25 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw protected ?Structure $structure = null; protected ?string $ids = null; protected Collection $structures; Loading Loading @@ -72,6 +74,29 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw public function getIds(): ?string { return $this->ids; } /** * Permet de savoir si l'objet est une sous-structure de $structure */ public function inStructure(Structure $structure): bool { $id = $structure->getId(); if (empty($this->ids)){ return false; } return str_contains($this->ids, '-'.$id.'-'); } public function getCode(): ?string { return $this->code; Loading Loading
module/Lieu/src/Entity/Db/Mapping/Lieu.Entity.Db.Structure.dcm.xml +1 Changes for module/Lieu/src/Entity/Db/Mapping/Lieu.Entity.Db.Structure.dcm.xml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ <field name="libelleLong" type="string" column="LIBELLE_LONG" length="200" nullable="false"/> <field name="enseignement" type="boolean" column="ENSEIGNEMENT" nullable="false"/> <field name="affAdresseContrat" type="boolean" column="AFF_ADRESSE_CONTRAT" nullable="false"/> <field name="ids" type="string" column="IDS" length="1000" nullable="true"/> <field name="adressePrecisions" type="string" column="ADRESSE_PRECISIONS" length="240" nullable="true"/> <field name="adresseNumero" type="string" column="ADRESSE_NUMERO" length="4" nullable="true"/> Loading
module/Lieu/src/Entity/Db/Structure.php +25 Changes for module/Lieu/src/Entity/Db/Structure.php: 25 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw protected ?Structure $structure = null; protected ?string $ids = null; protected Collection $structures; Loading Loading @@ -72,6 +74,29 @@ class Structure implements HistoriqueAwareInterface, ResourceInterface, ImportAw public function getIds(): ?string { return $this->ids; } /** * Permet de savoir si l'objet est une sous-structure de $structure */ public function inStructure(Structure $structure): bool { $id = $structure->getId(); if (empty($this->ids)){ return false; } return str_contains($this->ids, '-'.$id.'-'); } public function getCode(): ?string { return $this->code; Loading