• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/restservice.php
  • Класс: BitrixBizprocRestService
  • Вызов: RestService::getAppName
static function getAppName($appId)
{
	if (!Loader::includeModule('rest'))
		return array('*' => 'No app');

	$iterator = AppTable::getList(
		array(
			'filter' => array(
				'=CLIENT_ID' => $appId
			),
			'select' => array('ID', 'APP_NAME', 'CODE'),
		)
	);
	$app = $iterator->fetch();
	$result = array('*' => $app['APP_NAME'] ? $app['APP_NAME'] : $app['CODE']);

	$iterator = AppLangTable::getList(array(
		'filter' => array(
			'=APP_ID' => $app['ID'],
		),
		'select' => array('LANGUAGE_ID', 'MENU_NAME')
	));
	while($lang = $iterator->fetch())
	{
		$result[mb_strtoupper($lang['LANGUAGE_ID'])] = $lang['MENU_NAME'];
	}

	return $result;
}