From 980303342672419eafca70ae81eb8109600f682c Mon Sep 17 00:00:00 2001 From: Patrick Barroca <pbarroca@sandbox.pergame.net> Date: Mon, 22 Feb 2016 10:57:29 +0100 Subject: [PATCH] rel #38918 : handle user title label in print model --- VERSIONS_HOTLINE/38918 | 1 + library/Class/Users.php | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 VERSIONS_HOTLINE/38918 diff --git a/VERSIONS_HOTLINE/38918 b/VERSIONS_HOTLINE/38918 new file mode 100644 index 00000000000..ec1671d7980 --- /dev/null +++ b/VERSIONS_HOTLINE/38918 @@ -0,0 +1 @@ + - ticket #38918 : Modèles de fusion : Prise en charge du libellé de civilité. \ No newline at end of file diff --git a/library/Class/Users.php b/library/Class/Users.php index 88f9068def6..93f29be25da 100644 --- a/library/Class/Users.php +++ b/library/Class/Users.php @@ -1690,4 +1690,14 @@ class Class_Users extends Storm_Model_Abstract { public function getLibelle() { return $this->getNomComplet(); } + + + public function getLibelleCivilite() { + $title = $this->getCivilite(); + $labels = $this->getLoader()->getCivilitiesLabels(); + + return (static::CIVILITE_INDEFINIE != $title || array_key_exists($title, $labels)) + ? $labels[$title] + : ''; + } } \ No newline at end of file -- GitLab