• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/basetype/stringtype.php
  • Класс: BitrixBizprocBaseTypeStringType
  • Вызов: StringType::renderControlMultiple
static function renderControlMultiple(
	FieldType $fieldType,
	array $field,
	$value,
	$allowSelection,
	$renderMode
)
{
	if (!is_array($value) || is_array($value) && CBPHelper::isAssociativeArray($value))
	{
		$value = [$value];
	}

	if (empty($value))
	{
		$value[] = null;
	}

	$controls = [];

	foreach ($value as $k => $v)
	{
		$singleField = $field;
		$singleField['Index'] = $k;
		$controls[] = static::renderControl(
			$fieldType,
			$singleField,
			$v,
			$allowSelection,
			$renderMode
		);
	}

	if ($renderMode & FieldType::RENDER_MODE_PUBLIC)
	{
		$renderResult = static::renderPublicMultipleWrapper($fieldType, $field, $controls);
	}
	else
	{
		$renderResult = static::wrapCloneableControls($controls, static::generateControlName($field));
	}

	return $renderResult;
}