- Модуль: voximplant
- Путь к файлу: ~/bitrix/modules/voximplant/lib/integration/report/handler/averagecalltime/averagecalltime.php
- Класс: BitrixVoximplantIntegrationReportHandlerAverageCallTimeAverageCallTime
- Вызов: AverageCallTime::getMultipleData
public function getMultipleData()
{
$calculatedData = $this->getCalculatedData();
if (!$calculatedData['report'])
{
return [];
}
$this->preloadUserInfo(array_column($calculatedData['report'], 'PORTAL_USER_ID'));
$result = [];
foreach ($calculatedData['report'] as $key => $row)
{
if ((int)$row['AVG_CALL_TIME'] === 0)
{
unset($calculatedData['report'][$key]);
continue;
}
$user = $this->getUserInfo($row['PORTAL_USER_ID'], ['avatarWidth' => 60, 'avatarHeight' => 60]);
$result[] = [
'value' => [
'USER_NAME' => $user['name'],
'USER_ICON' => $user['icon'],
'AVG_CALL_TIME' => $row['AVG_CALL_TIME'],
'AVG_CALL_TIME_FORMATTED' => $this->formatDuration($row['AVG_CALL_TIME']),
'DYNAMICS' => $this->formatPeriodCompare((int)$row['AVG_CALL_TIME_COMPARE']),
'DYNAMICS_FORMATTED' => $this->formatDuration(abs((int)$row['AVG_CALL_TIME_COMPARE'])),
],
];
}
return $result;
}