From b0f06b1d7dc3a790d6d8babe5f0855c08c5f7878 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 20 Oct 2026 21:49:17 +0200 Subject: =?UTF-8?q?mise=20en=20place=20de=20l'h=C3=A9ritage=202,=20nombreu?= =?UTF-8?q?ses=20simplifications=20et=20factorisations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/NonVendue.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/model/entities/NonVendue.php') diff --git a/src/model/entities/NonVendue.php b/src/model/entities/NonVendue.php index b6b2612..5a8879e 100644 --- a/src/model/entities/NonVendue.php +++ b/src/model/entities/NonVendue.php @@ -9,4 +9,36 @@ class NonVendue extends Prestation { #[ORM\Column] private string $taches; + + public function getTaches(): string + { + return $this->taches; + } + public function getAllWithWindowFields(): array + { + $common_data = parent::getAllWithWindowFields(); + return array_merge($common_data, ["Tâches:" => $this->taches,]); + } + public function setTaches(string $value): NonVendue + { + $this->taches = $value; + return $this; + } + + //public function set(string $entry, string $input): void // pas nécessaire ici + + public function validateForm(array $data_array): bool + { + if(count($data_array) === 1){ + return true; + } + else{ + echo "erreur de NonVendue::validateForm(), le tableau \$data_array n'a pas la taille attendue.\n"; + return false; + } + } + public function hydrate(array $data_array): void + { + $this->setTaches($data_array[0]); + } } \ No newline at end of file -- cgit v1.2.3