Documentation

PrepareSettings

string
CIBlockProperty*::PrepareSettings(
array arFields
);

The method returns an array with additional property settings, or a complete set of settings, including standard settings. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Note №1: before Information block module version 12.5.7 the method returns only an array with additional property settings.

Note №2: is called before saving property metadata into the database.

Call parameters

Parameter Description
arFields
Metadata fields property values. See Structure for Iblock Module Tables

Returned value

String or an array. When method returns a complete set of settings, additional settings are passed in the USER_TYPE_SETTINGS key as an array.

See Also

Examples

<?
class CIBlockPropertyMyDateTime
{
function PrepareSettings($arFields)
{
$width = intval($arFields["USER_TYPE_SETTINGS"]["WIDTH"]);
if($width <= 0)
$width = 10;
return array("WIDTH" => $width);
}
}
?>


© «Bitrix24», 2001-2022
Up