• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/integrations/report/eventhandler.php
  • Класс: BitrixImOpenLinesIntegrationsReportEventHandler
  • Вызов: EventHandler::buildActivity
static function buildActivity()
{
	$widget = new Widget();
	$widget->setGId(Util::generateUserUniqueId());
	$widget->setWidgetClass(BaseWidget::getClassName());
	$widget->setViewKey(Activity::VIEW_KEY);
	$widget->setCategoryKey('open_lines');
	$widget->setBoardId('open_lines_report_base_board');

	$widget->getWidgetHandler(true)->updateFormElementValue('label', Loc::getMessage('REPORT_ACTIVITY_WIDGET_TITLE'));
	$widget->addConfigurations($widget->getWidgetHandler(true)->getConfigurations());

	$allTreatmentCount = new Report();
	$allTreatmentCount->setGId(Util::generateUserUniqueId());
	$allTreatmentCount->setReportClassName(Treatment::getClassName());
	$allTreatmentCount->setWidget($widget);
	$allTreatmentCount->getReportHandler(true)->updateFormElementValue('label', Loc::getMessage('REPORT_ALL_TREATMENT_COUNT_TITLE'));
	$allTreatmentCount->getReportHandler(true)->updateFormElementValue('groupingBy', Treatment::GROUP_BY_DATE);
	$allTreatmentCount->getReportHandler(true)->updateFormElementValue('calculate', Treatment::WHAT_WILL_CALCULATE_ALL_TREATMENT_BY_HOUR);
	$allTreatmentCount->addConfigurations($allTreatmentCount->getReportHandler(true)->getConfigurations());
	$widget->addReports($allTreatmentCount);

	return $widget;
}