Documentation

GetUserTypeDescription

array
CIBlockProperty*::GetUserTypeDescription( );

The method returns an array describing user property behaviour. Called by the event OnIBlockPropertyBuildList. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Array structure

FieldDescription
PROPERTY_TYPE
Required. Specifies for the module which property will be basic for storage of user property values, as well as for filtration and other actions:
  • S - string
  • N - floating point number
  • L - list of values
  • F - file
  • G - binding to sections
  • E - binding to elements
USER_TYPERequired. User field unique ID.
DESCRIPTIONRequired. Brief description. Will be printed in the property type selection list when editing information block.
CheckFieldsOptional. Array consisting of two elements can be the value of this field. First value can be a class name and second can be the method name to be called when a corresponding event is triggered.
GetUIFilterPropertySimilar. From version 18.5.0.
GetLengthSimilar.
ConvertToDBSimilar.
ConvertFromDBSimilar.
GetPropertyFieldHtmlSimilar.
GetPropertyFieldHtmlMultyOptional handler. Similar to [link=127153]GetPropertyFieldHtml[/link] with exception of the value receiving several values.
GetAdminListViewHTMLSimilar.
GetPublicViewHTMLSimilar.
GetPublicEditHTMLSimilar.
GetSettingsHTMLSimilar.
PrepareSettingsSimilar.

Call examples

Unavailable.

Returned value

Array.

See Also

Examples

<?
class CIBlockPropertyMyDateTime
{
public static function GetUserTypeDescription()
{
return array(
"PROPERTY_TYPE" =>"S",
"USER_TYPE" =>"MyDateTime",
"DESCRIPTION" =>"Date/Time",
//optional handlers
"CheckFields" =>array("CIBlockPropertyMyDateTime","CheckFields"),
"GetLength" =>array("CIBlockPropertyMyDateTime","GetLength"),
"ConvertToDB" =>array("CIBlockPropertyMyDateTime","ConvertToDB"),
"ConvertFromDB" =>array("CIBlockPropertyMyDateTime","ConvertFromDB"),
"GetPropertyFieldHtml" =>array("CIBlockPropertyMyDateTime","GetPropertyFieldHtml"),
"GetAdminListViewHTML" =>array("CIBlockPropertyMyDateTime","GetAdminListViewHTML"),
"GetPublicViewHTML" =>array("CIBlockPropertyMyDateTime","GetPublicViewHTML"),
"GetPublicEditHTML" =>array("CIBlockPropertyMyDateTime","GetPublicEditHTML"),
);
}
}
?>


© «Bitrix24», 2001-2024
Up