CCrmComponentHelper::getFieldInfoData

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmComponentHelper
  4. getFieldInfoData
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_component_helper.php
  • Класс: \CCrmComponentHelper
  • Вызов: CCrmComponentHelper::getFieldInfoData
static function getFieldInfoData($entityTypeId, $fieldType)
{
	$result = [];
	switch ($fieldType)
	{
		case "requisite":
			$result = [
				'presets'=> \CCrmInstantEditorHelper::prepareRequisitesPresetList(
					EntityRequisite::getDefaultPresetId($entityTypeId)
				),
				'feedback_form' => EntityRequisite::getRequisiteFeedbackFormParams()
			];
			break;
		case "requisite_address":
			$result = static::getRequisiteAddressFieldData((int)$entityTypeId);
			break;
		case "address":
			$featureRestriction = RestrictionManager::getAddressSearchRestriction();
			$result = [
				'multiple' => false,
				'autocompleteEnabled' => $featureRestriction->hasPermission(),
				'featureRestrictionCallback' => (
					$featureRestriction ? $featureRestriction->prepareInfoHelperScript() : ''
				)
			];
			break;
	}

	return $result;
}

Добавить комментарий