From cf1a4170c9d578877e62378b5cfcd23f8364b867 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr>
Date: Tue, 5 Feb 2019 08:29:06 +0100
Subject: [PATCH] Ajout des toString

---
 src/Octopus/Entity/Db/ImmobilierBatiment.php | 1 -
 src/Octopus/Entity/Db/ImmobilierLocal.php    | 6 +++++-
 src/Octopus/Entity/Db/ImmobilierNiveau.php   | 5 +++++
 src/Octopus/Entity/Db/ImmobilierSite.php     | 5 +++++
 src/Octopus/Entity/Db/Individu.php           | 6 ++++++
 src/Octopus/Entity/Db/Pays.php               | 5 +++++
 src/Octopus/Entity/Db/Structure.php          | 6 ++++++
 src/Octopus/Entity/Db/StructureType.php      | 5 +++++
 8 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/src/Octopus/Entity/Db/ImmobilierBatiment.php b/src/Octopus/Entity/Db/ImmobilierBatiment.php
index 48edde7..fc4c1b2 100644
--- a/src/Octopus/Entity/Db/ImmobilierBatiment.php
+++ b/src/Octopus/Entity/Db/ImmobilierBatiment.php
@@ -101,7 +101,6 @@ class ImmobilierBatiment {
     public function __toString()
     {
         $texte  = $this->getLibelle();
-        $texte .= " ";
         //$texte .= "<span class='badge'> ". $this->getSite()->getLibelle() ." </span>";
        return $texte;
     }
diff --git a/src/Octopus/Entity/Db/ImmobilierLocal.php b/src/Octopus/Entity/Db/ImmobilierLocal.php
index e389814..9b2af26 100644
--- a/src/Octopus/Entity/Db/ImmobilierLocal.php
+++ b/src/Octopus/Entity/Db/ImmobilierLocal.php
@@ -209,6 +209,10 @@ class ImmobilierLocal {
     }
 
 
-
+    public function __toString()
+    {
+        $texte  = $this->getLibelle();
+        return $texte;
+    }
 
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/ImmobilierNiveau.php b/src/Octopus/Entity/Db/ImmobilierNiveau.php
index 0b37f11..9fa3fde 100644
--- a/src/Octopus/Entity/Db/ImmobilierNiveau.php
+++ b/src/Octopus/Entity/Db/ImmobilierNiveau.php
@@ -78,6 +78,11 @@ class ImmobilierNiveau {
         return $this->batiment;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getLibelle();
+        return $texte;
+    }
 
 
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/ImmobilierSite.php b/src/Octopus/Entity/Db/ImmobilierSite.php
index 6e4de8d..88c4ea2 100644
--- a/src/Octopus/Entity/Db/ImmobilierSite.php
+++ b/src/Octopus/Entity/Db/ImmobilierSite.php
@@ -78,4 +78,9 @@ class ImmobilierSite {
         return $this->clefGestimmo;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getLibelle();
+        return $texte;
+    }
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/Individu.php b/src/Octopus/Entity/Db/Individu.php
index ff9fd84..0ffd901 100644
--- a/src/Octopus/Entity/Db/Individu.php
+++ b/src/Octopus/Entity/Db/Individu.php
@@ -197,4 +197,10 @@ class Individu {
         return $this->dateModification;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getPrenom(). " " . $this->getNomUsage();
+        return $texte;
+    }
+
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/Pays.php b/src/Octopus/Entity/Db/Pays.php
index c58e486..a77cc5f 100644
--- a/src/Octopus/Entity/Db/Pays.php
+++ b/src/Octopus/Entity/Db/Pays.php
@@ -109,4 +109,9 @@ class Pays {
         return $this->dateFermeture;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getLibelleLong();
+        return $texte;
+    }
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/Structure.php b/src/Octopus/Entity/Db/Structure.php
index d8ccbc2..54e75f7 100644
--- a/src/Octopus/Entity/Db/Structure.php
+++ b/src/Octopus/Entity/Db/Structure.php
@@ -149,4 +149,10 @@ class Structure {
         return $this->typeSupann;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getLibelleLong();
+        return $texte;
+    }
+
 }
\ No newline at end of file
diff --git a/src/Octopus/Entity/Db/StructureType.php b/src/Octopus/Entity/Db/StructureType.php
index 6cfd4f8..af62a87 100644
--- a/src/Octopus/Entity/Db/StructureType.php
+++ b/src/Octopus/Entity/Db/StructureType.php
@@ -44,5 +44,10 @@ class StructureType {
         return $this->description;
     }
 
+    public function __toString()
+    {
+        $texte  = $this->getLibelle();
+        return $texte;
+    }
 
 }
\ No newline at end of file
-- 
GitLab