mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-27 10:53:48 +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>
|
||||
*
|
||||
* @retval string Le label de l'objet ($this -> config['label'])
|
||||
* @retval string The translated object type label
|
||||
*/
|
||||
public function getLabel($type=null) {
|
||||
if (is_null($type)) {
|
||||
$type = $this -> type_name;
|
||||
}
|
||||
return __(LSconfig::get("LSobjects.$type.label"));
|
||||
public static function getLabel($type=null) {
|
||||
if (is_null($type))
|
||||
$type = get_called_class();
|
||||
self :: log_debug("getLabel($type): LSobjects.$type.label");
|
||||
$label = LSconfig::get("LSobjects.$type.label");
|
||||
if (!$label) return;
|
||||
return __($label);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue