CBitrixCloudMonitoring :: getAlertsCurrentResult: Bitrix method

      
<?php 
//  CBitrixCloudMonitoring :: getAlertsCurrentResult()
//  /dist/bitrix/modules/bitrixcloud/classes/general/monitoring.php:227

    
public function getAlertsCurrentResult()
    {
        
$alerts false;
        if (
$this->result)
        {
            
$alerts = array();
            foreach (
$this->result as $domainName => $domainResult)
            {
                foreach (
$domainResult as $testId => $testResult)
                {
                    if (
$testResult->getStatus() === CBitrixCloudMonitoringResult::RED_LAMP)
                        
$alerts[$domainName][$testId] = $testId;
                }

                if (isset(
$alerts[$domainName]))
                {
                    
ksort($alerts[$domainName]);
                    
$alerts[$domainName] = implode(","$alerts[$domainName]);
                }
            }
            
ksort($alerts);
        }
        return 
$alerts;
    }