mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
LSldapObject :: getLabel(): fix method to be really static
This commit is contained in:
parent
510f3d4bdc
commit
e1cce4e696
1 changed files with 11 additions and 7 deletions
|
@ -1042,17 +1042,21 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le label de l'objet
|
* Retreive object type translated label
|
||||||
|
*
|
||||||
|
* @param[in] $type string|null The object type (optional, default: called class name)
|
||||||
*
|
*
|
||||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||||
*
|
*
|
||||||
* @retval string Le label de l'objet ($this -> config['label'])
|
* @retval string The translated object type label
|
||||||
*/
|
*/
|
||||||
public function getLabel($type=null) {
|
public static function getLabel($type=null) {
|
||||||
if (is_null($type)) {
|
if (is_null($type))
|
||||||
$type = $this -> type_name;
|
$type = get_called_class();
|
||||||
}
|
self :: log_debug("getLabel($type): LSobjects.$type.label");
|
||||||
return __(LSconfig::get("LSobjects.$type.label"));
|
$label = LSconfig::get("LSobjects.$type.label");
|
||||||
|
if (!$label) return;
|
||||||
|
return __($label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue