mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
Exports: attribute "final class" is either translated or not, depending on the no_localize option (all formats concerned with this option: CSV and spreadsheet -That field is not present in the XML format output)
SVN:trunk[3727]
This commit is contained in:
@@ -1910,11 +1910,52 @@ class AttributeFinalClass extends AttributeString
|
||||
}
|
||||
|
||||
public function GetAsHTML($sValue, $oHostObject = null, $bLocalize = true)
|
||||
{
|
||||
if (empty($sValue)) return '';
|
||||
if ($bLocalize)
|
||||
{
|
||||
return MetaModel::GetName($sValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $sValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Because this is sometimes used to get a localized/string version of an attribute...
|
||||
public function GetEditValue($sValue, $oHostObj = null)
|
||||
{
|
||||
if (empty($sValue)) return '';
|
||||
return MetaModel::GetName($sValue);
|
||||
}
|
||||
|
||||
public function GetAsCSV($value, $sSeparator = ',', $sTextQualifier = '"', $oHostObject = null, $bLocalize = true)
|
||||
{
|
||||
if ($bLocalize && $value != '')
|
||||
{
|
||||
$sRawValue = MetaModel::GetName($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sRawValue = $value;
|
||||
}
|
||||
return parent::GetAsCSV($sRawValue, $sSeparator, $sTextQualifier, null, false);
|
||||
}
|
||||
|
||||
public function GetAsXML($value, $oHostObject = null, $bLocalize = true)
|
||||
{
|
||||
if (empty($value)) return '';
|
||||
if ($bLocalize)
|
||||
{
|
||||
$sRawValue = MetaModel::GetName($value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sRawValue = $value;
|
||||
}
|
||||
return Str::pure2xml($sRawValue);
|
||||
}
|
||||
|
||||
public function GetBasicFilterLooseOperator()
|
||||
{
|
||||
return '=';
|
||||
|
||||
Reference in New Issue
Block a user