• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/businessvalue.php
  • Класс: BitrixSaleBusinessValue
  • Вызов: BusinessValue::getGroups
static function getGroups()
{
	static $groups = array();

	if (! $groups)
	{
		foreach (EventManager::getInstance()->findEventHandlers('sale', 'OnGetBusinessValueGroups') as $handler)
		{
			$result = ExecuteModuleEventEx($handler); // TODO modern api

			if (is_array($result))
			{
				foreach ($result as $groupKey => $group)
				{
					if ($groupKey && is_array($group) && !isset($groups[$groupKey]))
					{
						$groups[$groupKey] = $group;
					}
				}
			}
		}

		self::sortArray($groups);
	}

	return $groups;
}