From 695a00f21caf4f797f8fd928cd3cbd7311b08536 Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Wed, 19 Jun 2019 14:04:01 +0100 Subject: [PATCH] New:Show labels of countries in modulebuilder --- htdocs/core/class/ccountry.class.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index a97d992bf89..d5a929be0dd 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -30,7 +30,7 @@ /** * Class to manage dictionary Countries (used by imports) */ -class Ccountry // extends CommonObject +class Ccountry extends CommonObject { /** * @var DoliDB Database handler. @@ -332,4 +332,19 @@ class Ccountry // extends CommonObject return 1; } } + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + { + global $langs; + return $langs->trans($this->label); + } }