mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
(retrofit from trunk) Added AttributeDef::EnumTemplateVerbs, to generate the documentation about the available attribute formatting placeholders
SVN:2.2.0[3838]
This commit is contained in:
@@ -489,6 +489,19 @@ abstract class AttributeDefinition
|
|||||||
return $this->GetAsHTML($sValue, $oHostObject, $bLocalize);
|
return $this->GetAsHTML($sValue, $oHostObject, $bLocalize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the available verbs for 'GetForTemplate'
|
||||||
|
*/
|
||||||
|
public static function EnumTemplateVerbs()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'' => 'Plain text (unlocalized) representation',
|
||||||
|
'html' => 'HTML representation',
|
||||||
|
'label' => 'Localized representation',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
||||||
* @param $value mixed The current value of the field
|
* @param $value mixed The current value of the field
|
||||||
@@ -818,6 +831,17 @@ class AttributeLinkedSet extends AttributeDefinition
|
|||||||
return $sRes;
|
return $sRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the available verbs for 'GetForTemplate'
|
||||||
|
*/
|
||||||
|
public static function EnumTemplateVerbs()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'' => 'Plain text (unlocalized) representation',
|
||||||
|
'html' => 'HTML representation (unordered list)',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
||||||
* @param $value mixed The current value of the field
|
* @param $value mixed The current value of the field
|
||||||
@@ -2502,6 +2526,18 @@ class AttributeCaseLog extends AttributeLongText
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the available verbs for 'GetForTemplate'
|
||||||
|
*/
|
||||||
|
public static function EnumTemplateVerbs()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'' => 'Plain text representation of all the log entries',
|
||||||
|
'head' => 'Plain text representation of the latest entry',
|
||||||
|
'head_html' => 'HTML representation of the latest entry',
|
||||||
|
'html' => 'HTML representation of all the log entries',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
* Get various representations of the value, for insertion into a template (e.g. in Notifications)
|
||||||
|
|||||||
Reference in New Issue
Block a user