mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°931: Tags data class display name
This commit is contained in:
@@ -964,6 +964,28 @@ abstract class DBObject implements iDisplay
|
||||
return MetaModel::GetClassIcon(get_class($this), $bImgTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name as defined in the dictionary
|
||||
* @return string (empty for default name scheme)
|
||||
*/
|
||||
public static function GetClassName($sClass)
|
||||
{
|
||||
$sStringCode = 'Class:'.$sClass;
|
||||
return Dict::S($sStringCode, str_replace('_', ' ', $sClass));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the description as defined in the dictionary
|
||||
* @param string $sClass
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
final static public function GetClassDescription($sClass)
|
||||
{
|
||||
$sStringCode = 'Class:'.$sClass.'+';
|
||||
return Dict::S($sStringCode, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of an object in a safe manner for displaying inside a web page
|
||||
* @return string
|
||||
|
||||
Reference in New Issue
Block a user