Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
report.php
1<?php
3
6
11class Report
12{
21 public static function buildReportHandlerForWidget($reportHandlerClassName, \Bitrix\Report\VisualConstructor\Entity\Widget $widget, $isPseudo = false)
22 {
23 $reportHandler = ReportProvider::getReportHandlerByClassName($reportHandlerClassName);
24 if ($reportHandler instanceof BaseReport)
25 {
27 $reportHandler = new $reportHandler;
28 $reportHandler->setView($widget->getWidgetHandler()->getView());
29 $reportHandler->setWidgetHandler($widget->getWidgetHandler());
30 if ($isPseudo)
31 {
32 $reportHandler->getReport()->setGId('_pseudo' . Util::generateUserUniqueId());
33 }
34 else
35 {
36 $reportHandler->getReport()->setGId(Util::generateUserUniqueId());
37 }
38
39 $reportHandler->getReport()->setWidget($widget);
40 $reportHandler->getCollectedFormElements();
41 return $reportHandler;
42 }
43 return null;
44 }
45}
static generateUserUniqueId($prefix='')
Definition util.php:16