• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/helper/widget.php
  • Класс: BitrixReportVisualConstructorHelperWidget
  • Вызов: Widget::prepareBoardWithEntitiesByBoardId
static function prepareBoardWithEntitiesByBoardId($boardKey)
{
	$dashboard = self::getDashboard($boardKey);
	if ($dashboard)
	{
		$rows = $dashboard->getRows();
		$resultRows = array();
		$i = 0;
		if ($rows)
		{
			foreach ($rows as $row)
			{
				$resultRow = array(
					'id' => $row->getGId(),
					'layoutMap' => $row->getLayoutMap(),
					'weight' => $row->getWeight(),
				);
				/** @var WidgetEntity $widget */
				foreach ($row->getWidgets() as $widget)
				{
					$resultRow['widgets'][] = self::prepareWidgetContent($widget, !self::LAZY_LOAD_MODE);
				}
				$i++;
				$resultRows[] = $resultRow;
			}
		}

		return array(
			'boardId' => $dashboard->getBoardKey(),
			'boardKey' => $dashboard->getBoardKey(),
			'userId' => $dashboard->getUserId(),
			'rows' => $resultRows
		);
	}
	else
	{
		return array();
	}
}