ProductLoader::getFieldType

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. ProductLoader
  4. getFieldType
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/documentgenerator/productloader.php
  • Класс: Bitrix\Crm\Integration\DocumentGenerator\ProductLoader
  • Вызов: ProductLoader::getFieldType
protected function getFieldType(array $property): ?string
{
	if ($property['PROPERTY_TYPE'] === 'F')
	{
		return DataProvider\Product::FIELD_TYPE_IMAGE;
	}
	if ($property['PROPERTY_TYPE'] !== 'S' || empty($property['USER_TYPE']))
	{
		return null;
	}

	if ($property['USER_TYPE'] === 'HTML')
	{
		return DataProvider\Product::FIELD_TYPE_TEXT;
	}
	if ($property['USER_TYPE'] === 'Date' || $property['USER_TYPE'] === 'DateTime')
	{
		return DataProvider\Product::FIELD_TYPE_DATE;
	}
	if ($property['USER_TYPE'] === 'Money')
	{
		return Money::class;
	}

	return null;
}

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