Documentation

Field rendering via new API

$field = new \Bitrix\Main\UserField\Renderer($userField, $params);
print $field->render();

Associative array $params can contain the keys MODE and MEDIA_TYPE, specifying names of corresponding templates and types. The MODE can be both a string with a template name and an array of desirable template names listed by priority.

$userField - associative array, describing UF-field. Minimally, it must contain the key USER_TYPE_ID with unique identifier for UF-field type.



© «Bitrix24», 2001-2024