- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/bizproctype/usertypepropertydiskfile.php
- Класс: BitrixIblockBizprocTypeUserTypePropertyDiskFile
- Вызов: UserTypePropertyDiskFile::renderControlMultiple
static function renderControlMultiple(FieldType $fieldType, array $field, $value, $allowSelection, $renderMode)
{
if ($allowSelection)
{
$selectorValue = null;
if(is_array($value))
{
$value = current($value);
}
if (CBPActivity::isExpression($value))
{
$selectorValue = $value;
$value = null;
}
return static::renderControlSelector($field, $selectorValue, true, '', $fieldType);
}
if ($renderMode & FieldType::RENDER_MODE_DESIGNER)
return '';
if ($renderMode & FieldType::RENDER_MODE_MOBILE)
{
return self::renderMobileControl($fieldType, $field, $value);
}
$userType = static::getUserType($fieldType);
$iblockId = self::getIblockId($fieldType);
if (!empty($userType['GetPublicEditHTML']))
{
if (is_array($value) && isset($value['VALUE']))
$value = $value['VALUE'];
$fieldName = static::generateControlName($field);
$renderResult = call_user_func_array(
$userType['GetPublicEditHTML'],
array(
array(
'IBLOCK_ID' => $iblockId,
'IS_REQUIRED' => $fieldType->isRequired()? 'Y' : 'N',
'PROPERTY_USER_TYPE' => $userType
),
array('VALUE' => $value),
array(
'FORM_NAME' => $field['Form'],
'VALUE' => $fieldName,
'DESCRIPTION' => '',
),
true
)
);
}
else
$renderResult = static::renderControl($fieldType, $field, $value, $allowSelection, $renderMode);
return $renderResult;
}