• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/entityproperty.php
  • Класс: BitrixSaleEntityProperty
  • Вызов: EntityProperty::__construct
public function __construct(array $property, array $relation = null)
{
	if (isset($property['SETTINGS']) && is_array($property['SETTINGS']))
	{
		$property += $property['SETTINGS'];
		unset ($property['SETTINGS']);
	}

	$this->fields = $property;

	if ($relation === null)
	{
		$relation = $this->loadRelations();
	}

	$this->fields['RELATION'] = $relation;

	if ($this->fields['TYPE'] === 'ENUM')
	{
		if (!isset($property['OPTIONS']))
		{
			$this->fields['OPTIONS'] = $this->loadOptions();
		}
	}

	$this->fields['DEFAULT_VALUE'] = $this->normalizeValue($this->fields['DEFAULT_VALUE']);
}