From 6f4cc3afffde36a13618458ffda72e6104624f36 Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 30 Aug 2023 12:20:39 +0200 Subject: =?UTF-8?q?section=20client=20=C3=A0=20part,=20section=20modif=20e?= =?UTF-8?q?n=20cours,=20bug=20dans=20Dates,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/Locations.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/model/Locations.php') diff --git a/src/model/Locations.php b/src/model/Locations.php index b669e7c..e3c9507 100644 --- a/src/model/Locations.php +++ b/src/model/Locations.php @@ -4,6 +4,7 @@ class Locations extends Model { // lecture des données ou hydratation + protected $ID; protected $ID_presta; protected $designation; protected $modele_description; @@ -15,13 +16,26 @@ class Locations extends Model protected $loyers_payes; protected $caution; - //~ use ModelChildren; - public function __construct() { $this->table = strtolower(__CLASS__); // locations } + public function getAllWithWindowFields(): array // différent de Model::getAll() qui retourne get_object_vars($this) + { + return [ + "Numéro location:" => $this->ID, + "Désignation:" => $this->designation, + "Description du modèle:" => $this->modele_description, + "Valeur:" => $this->valeur, + "État des lieux de début:" => $this->etat_des_lieux_debut, + "État des lieux de fin:" => $this->etat_des_lieux_fin, + "Durée de la location:" => $this->duree_location, + "Loyer Mensuel" => $this->loyer_mensuel, + "Loyers Payés" => $this->loyers_payes, + "Caution" => $this->caution]; + } + // setters public function setIDPresta(int $value) { -- cgit v1.2.3