From 46591fffb0226b0fa87e68248b06182389825f80 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 27 May 2024 21:34:05 +0200 Subject: =?UTF-8?q?typeToClient()=20modifie=20$Client=20et=20ne=20touche?= =?UTF-8?q?=20la=20base=20que=20si=20n=C3=A9cessaire,=20nettoyage=20divers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/Clients.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/model/Clients.php') diff --git a/src/model/Clients.php b/src/model/Clients.php index a5cc276..0f70eb6 100644 --- a/src/model/Clients.php +++ b/src/model/Clients.php @@ -124,6 +124,18 @@ class Clients extends Model $this->type = (string) $value; return $this; } + public function typeToClient(): bool + { + if($this->type != 'client') + { + $this->type = 'client'; + return true; + } + else + { + return false; + } + } public function findByKeywords(array $keywords, string $field): array // n'hydrate pas les variables, on doit choisir un client et hydrater ensuite -- cgit v1.2.3