3namespace Bitrix\Report\VisualConstructor\Entity;
5use Bitrix\Report\VisualConstructor\Config\Common;
6use Bitrix\Report\VisualConstructor\Handler\BaseReport;
7use Bitrix\Report\VisualConstructor\Internal\Error\Error;
8use Bitrix\Report\VisualConstructor\Internal\ReportConfigurationTable;
9use Bitrix\Report\VisualConstructor\Internal\ReportTable;
10use Bitrix\Report\VisualConstructor\RuntimeProvider\ReportProvider;
46 $attributes = parent::getMapAttributes();
47 $attributes[
'GID'] =
'gId';
48 $attributes[
'REPORT_CLASS'] =
'reportClassName';
49 $attributes[
'WIDGET_ID'] =
'widgetId';
50 $attributes[
'WEIGHT'] =
'weight';
61 'configurations' =>
array(
62 'type' => Common::MANY_TO_MANY,
66 'column' =>
array(
'REPORT' =>
array(
'id',
'REPORT_ID')),
67 'inverseColumn' =>
array(
'CONFIGURATION_SETTING' =>
array(
'id',
'CONFIGURATION_ID'))
71 'type' => Common::MANY_TO_ONE,
73 'inversedBy' =>
'reports',
75 'field' =>
array(
'widgetId',
'id')
93 array(
'widget',
'configurations')
104 $coreReport = clone $this;
105 $copyReport =
new Report();
106 $copyReport->setId(
null);
107 $copyReport->setGId($coreReport->getGId());
108 $copyReport->setWeight($coreReport->getWeight());
109 $copyReport->setWidgetId($coreReport->getWidgetId());
110 $copyReport->setReportClassName($coreReport->getReportClassName());
117 $configuration->setId(
null);
118 $copyReport->addConfigurations($configuration);
174 if (!$this->reportHandler)
176 $reportHandlerFromEvent = ReportProvider::getReportHandlerByClassName($this->reportClassName);
177 if ($reportHandlerFromEvent)
179 $this->reportHandler =
new $reportHandlerFromEvent;
180 $this->reportHandler->setView($this->
getWidget()->getWidgetHandler()->getView());
185 $this->reportHandler->fillReport($this);
189 $this->errors[] =
new Error(
'No such report handler with this class');
205 $this->reportHandler = $handler;
237 if (!$this->widget && $this->widgetId)
static getReportByGId($reportGId)
static getMapReferenceAttributes()
static getMapAttributes()
setReportClassName($reportClassName)
getReportHandler($isRuntime=false)
setReportHandler(BaseReport $handler)
static getTableClassName()
loadAttribute($attributeName)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)