• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/dashboard/managers/managersrating.php
  • Класс: Bitrix\Crm\Integration\Report\Dashboard\Managers\ManagersRating
  • Вызов: ManagersRating::buildManagersRatingGrid
static function buildManagersRatingGrid()
{
	$widget = new Widget();
	$widget->setGId(Util::generateUserUniqueId());
	$widget->setWidgetClass(BaseWidget::getClassName());
	$widget->setViewKey(View\Managers\ManagersRatingGrid::VIEW_KEY);
	$widget->setCategoryKey('crm');
	$widget->setBoardId(self::BOARD_KEY);

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

	$report = new Report();
	$report->setGId(Util::generateUserUniqueId());
	$report->setReportClassName(Handler\Managers\RatingGrid::getClassName());
	$report->setWidget($widget);
	$report->addConfigurations($report->getReportHandler(true)->getConfigurations());
	$widget->addReports($report);

	return $widget;
}