• Модуль: crmmobile
  • Путь к файлу: ~/bitrix/modules/crmmobile/lib/Kanban/ControllerStrategy/ListStrategy.php
  • Класс: BitrixCrmMobileKanbanControllerStrategyListStrategy
  • Вызов: ListStrategy::createField
protected function createField(string $fieldName, Collection $fieldsCollection): Field
{
	$field = $fieldsCollection->getField($fieldName);
	if (!$field)
	{
		throw new FieldNotFoundException('Field: ' . $fieldName . ' not found');
	}

	$fieldId = $field->getName();
	if (!empty($field->getUserField()))
	{
		return Field::createFromUserField($fieldId, $field->getUserField());
	}

	$displayField = (Field::createByType($field->getType(), $fieldId))->setTitle($field->getTitle());

	foreach ($field->getSettings() as $name => $setting)
	{
		$displayField->addDisplayParam($name, $setting);
	}

	if ($entityType = $field->getCrmStatusType())
	{
		$displayField->addDisplayParam('ENTITY_TYPE', $entityType);
	}

	if ($valueType = $field->getValueType())
	{
		$displayField->addDisplayParam('VALUE_TYPE', $valueType);
	}

	return $displayField;
}