N°931: Tags data class display name

This commit is contained in:
Eric
2018-09-18 11:38:34 +02:00
parent 5403219746
commit c3c1897258
7 changed files with 61 additions and 12 deletions

View File

@@ -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