mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
GetValueLabel is used in some dashboards... make sure that it is available for any attribute
SVN:1.2[1617]
This commit is contained in:
@@ -207,6 +207,15 @@ abstract class AttributeDefinition
|
|||||||
return $sLabel;
|
return $sLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the label corresponding to the given value
|
||||||
|
* To be overloaded for localized enums
|
||||||
|
*/
|
||||||
|
public function GetValueLabel($sValue)
|
||||||
|
{
|
||||||
|
return GetAsHTML($sValue);
|
||||||
|
}
|
||||||
|
|
||||||
public function GetLabel_Obsolete()
|
public function GetLabel_Obsolete()
|
||||||
{
|
{
|
||||||
// Written for compatibility with a data model written prior to version 0.9.1
|
// Written for compatibility with a data model written prior to version 0.9.1
|
||||||
@@ -1334,6 +1343,11 @@ class AttributeFinalClass extends AttributeString
|
|||||||
return '=';
|
return '=';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function GetValueLabel($sValue)
|
||||||
|
{
|
||||||
|
if (empty($sValue)) return '';
|
||||||
|
return MetaModel::GetName($sValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user