• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/rest/appplacementmanager.php
  • Класс: Bitrix\Crm\Integration\Rest\AppPlacementManager
  • Вызов: AppPlacementManager::getHandlerInfos
static function getHandlerInfos($placement)
{
	if(!Main\Loader::includeModule('rest'))
	{
		return [];
	}

	$results = [];
	foreach(Rest\PlacementTable::getHandlersList($placement) as $handler)
	{
		$info = [ 'ID' => (int)$handler['ID'], 'APP_ID' => (int)$handler['APP_ID'] ];

		$title = isset($handler['TITLE']) ? trim($handler['TITLE']) : '';
		$info['TITLE'] = $title !== '' ? $title : $handler['APP_NAME'];

		$groupName = isset($handler['GROUP_NAME']) ? trim($handler['GROUP_NAME']) : '';
		if($groupName === '')
		{
			$groupName = Loc::getMessage('CRM_APP_PLACEMENT_DEFAULT_GROUP');
		}
		if(!isset($results[$groupName]))
		{
			$results[$groupName] = [];
		}
		$results[$groupName][] = $info;
	}
	return $results;
}