Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
base.php
1<?php
2
4
8
13abstract class Base extends View
14{
22 public function prepareWidgetContent(Widget $widget, $withCalculatedData = false)
23 {
24 $resultWidget = parent::prepareWidgetContent($widget, $withCalculatedData);
25 try
26 {
27 $calculatedPerformedData = $withCalculatedData ? WidgetHelper::getCalculatedPerformedData($this, $widget) : array();
28 $resultWidget['content']['params']['data'] = $this->handlerFinallyBeforePassToView($calculatedPerformedData);
29 $resultWidget['content']['params']['data']['isFilled'] = !empty($resultWidget['content']['params']['data']);
30 $resultWidget['content']['params']['color'] = $resultWidget['config']['color'];
31 $resultWidget['content']['params']['errors'] = $calculatedPerformedData['errors'];
32 }
33 catch (\Throwable $exception)
34 {
35 $resultWidget['content']['params']['errors'] = [$exception->getMessage()];
36 }
37
38 return $resultWidget;
39 }
40}
static getCalculatedPerformedData($view, $widget)
Definition widget.php:42
handlerFinallyBeforePassToView($dataFromReport)
prepareWidgetContent(Widget $widget, $withCalculatedData=false)
Definition base.php:22