summaryrefslogtreecommitdiff
path: root/src/model/entities/NonVendue.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/entities/NonVendue.php')
-rw-r--r--src/model/entities/NonVendue.php32
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