• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/integration/report/view/callactivity/callactivitygraph.php
  • Класс: BitrixVoximplantIntegrationReportViewCallActivityCallActivityGraph
  • Вызов: CallActivityGraph::handlerFinallyBeforePassToView
public function handlerFinallyBeforePassToView($dataFromReport)
{
	if (!$dataFromReport['items'])
	{
		return parent::handlerFinallyBeforePassToView($dataFromReport);
	}

	foreach ($dataFromReport['items'] as $index => $row)
	{
		$dataFromReport['items'][$index]['value'] = [
			$row['incoming'],
			$row['missed'],
		];

		unset(
			$dataFromReport['items'][$index]['incoming'],
			$dataFromReport['items'][$index]['missed']
		);
	}

	$report = parent::handlerFinallyBeforePassToView($dataFromReport);

	$report['config']['tooltips'] = [
		[
			'title' => Loc::getMessage('TELEPHONY_REPORT_GRAPH_CALL_ACTIVITY_INCOMING'),
			'color' => '#2fc6f5'
		],
		[
			'title' => Loc::getMessage('TELEPHONY_REPORT_GRAPH_CALL_ACTIVITY_MISSED'),
			'color' => '#f44818'
		]
	];

	return $report;
}