• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/lib/field.php
  • Класс: BitrixListsField
  • Вызов: Field::prepareEditFieldByTypeN
static function prepareEditFieldByTypeN(array $field)
{
	$result = array(
		'id' => $field['FIELD_ID'],
		'name' => $field['NAME'],
		'required' => $field['IS_REQUIRED'] == 'Y' ? true : false,
		'type' => 'custom',
		'show' => $field['SHOW'],
		'customHtml' => '',
	);
	$html = '';
	$disabled = $field['READ'] == 'Y' ? 'disabled' : '';
	if(!is_array($field['VALUE']))
		$field['VALUE'] = array($field['VALUE']);

	if($field['MULTIPLE'] == 'Y')
	{
		$html .= '';
		foreach($field['VALUE'] as $key => $value)
		{
			if($field['READ'] == 'Y')
			{
				if(empty($value['VALUE'])) continue;
				$result['customHtml'] .= '';
			}
			$html .= '';
		}
		$html .= '
'; if($field['READ'] == 'N') { $html .= ''; } } else { foreach($field['VALUE'] as $key => $value) { $html .= ''; if($field['READ'] == 'Y') { if(empty($value['VALUE'])) continue; $result['customHtml'] .= ''; } } } $result['value'] = $html; return $result; }