• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/entitypropertyvaluecollection.php
  • Класс: BitrixSaleEntityPropertyValueCollection
  • Вызов: EntityPropertyValueCollection::getArray
public function getArray(bool $refreshData = false)
{
	$groups = $this->getGroups($refreshData);

	$properties = [];

	/** @var EntityPropertyValue $propertyValue */
	foreach ($this->collection as $propertyValue)
	{
		$p = $propertyValue->getProperty();

		if (!isset($p["ID"]))
		{
			if ($propertyValue->getField("ORDER_PROPS_ID") > 0)
			{
				$p["ID"] = $propertyValue->getField('ORDER_PROPS_ID');
			}
			else
			{
				$p["ID"] = "n".$propertyValue->getInternalIndex();
			}
		}

		$value = $propertyValue->getValue();

		$value = $propertyValue->getValueId() ? $value : ($value ? $value : $p['DEFAULT_VALUE']);

		$value = array_values(Manager::asMultiple($p, $value));

		$p['VALUE'] = $value;

		$properties[] = $p;
	}

	return ['groups' => $groups, 'properties' => $properties];
}