RestService::getAppName: Bitrix method

      
<?php 
//  Bitrix\Bizproc\RestService :: getAppName()
//  /dist/bitrix/modules/bizproc/lib/restservice.php:1326

    
private 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[strtoupper($lang['LANGUAGE_ID'])] = $lang['MENU_NAME'];
        }

        return 
$result;
    }