• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/entityproperty.php
  • Класс: BitrixSaleEntityProperty
  • Вызов: EntityProperty::getGroupInfo
public function getGroupInfo(bool $refreshData = false)
{
	static $groupList = [];

	if ($refreshData || !isset($groupList[$this->getPersonTypeId()]))
	{
		$dbRes = OrderPropsGroupTable::getList([
			'filter' => [
				'=PERSON_TYPE_ID' => $this->getPersonTypeId()
			]
		]);
		while ($group = $dbRes->fetch())
		{
			$groupList[$this->getPersonTypeId()][$group['ID']] = $group;
		}
	}

	$groupId = $this->getGroupId();

	if (!isset($groupList[$this->getPersonTypeId()][$groupId]))
	{
		return [
			'ID' => 0,
			'NAME' => Loc::getMessage('SOP_UNKNOWN_GROUP'),
		];
	}

	return $groupList[$this->getPersonTypeId()][$groupId];
}