diff options
| author | polo <ordipolo@gmx.fr> | 2026-10-20 21:49:17 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-10-20 21:49:17 +0200 |
| commit | b0f06b1d7dc3a790d6d8babe5f0855c08c5f7878 (patch) | |
| tree | bbaea156e9d32edf14adad8fe5ce3338014e7710 /src/model/entities/NonVendue.php | |
| parent | 79bc73d7985f51f2a6a1b3cb6e0115f59afb2ac4 (diff) | |
| download | AppliGestionPHP-b0f06b1d7dc3a790d6d8babe5f0855c08c5f7878.tar.gz AppliGestionPHP-b0f06b1d7dc3a790d6d8babe5f0855c08c5f7878.tar.bz2 AppliGestionPHP-b0f06b1d7dc3a790d6d8babe5f0855c08c5f7878.zip | |
mise en place de l'héritage 2, nombreuses simplifications et factorisations
Diffstat (limited to 'src/model/entities/NonVendue.php')
| -rw-r--r-- | src/model/entities/NonVendue.php | 32 |
1 files changed, 32 insertions, 0 deletions
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 | |||
| 9 | { | 9 | { |
| 10 | #[ORM\Column] | 10 | #[ORM\Column] |
| 11 | private string $taches; | 11 | private string $taches; |
| 12 | |||
| 13 | public function getTaches(): string | ||
| 14 | { | ||
| 15 | return $this->taches; | ||
| 16 | } | ||
| 17 | public function getAllWithWindowFields(): array | ||
| 18 | { | ||
| 19 | $common_data = parent::getAllWithWindowFields(); | ||
| 20 | return array_merge($common_data, ["Tâches:" => $this->taches,]); | ||
| 21 | } | ||
| 22 | public function setTaches(string $value): NonVendue | ||
| 23 | { | ||
| 24 | $this->taches = $value; | ||
| 25 | return $this; | ||
| 26 | } | ||
| 27 | |||
| 28 | //public function set(string $entry, string $input): void // pas nécessaire ici | ||
| 29 | |||
| 30 | public function validateForm(array $data_array): bool | ||
| 31 | { | ||
| 32 | if(count($data_array) === 1){ | ||
| 33 | return true; | ||
| 34 | } | ||
| 35 | else{ | ||
| 36 | echo "erreur de NonVendue::validateForm(), le tableau \$data_array n'a pas la taille attendue.\n"; | ||
| 37 | return false; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | public function hydrate(array $data_array): void | ||
| 41 | { | ||
| 42 | $this->setTaches($data_array[0]); | ||
| 43 | } | ||
| 12 | } \ No newline at end of file | 44 | } \ No newline at end of file |
