• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/dashboard/sales/salesperiodcompare.php
  • Класс: Bitrix\Crm\Integration\Report\Dashboard\Sales\SalesPeriodCompare
  • Вызов: SalesPeriodCompare::buildPeriodCompareDefaultBoard
static function buildPeriodCompareDefaultBoard()
{
	$board = new Dashboard();
	$board->setVersion(self::VERSION);
	$board->setBoardKey(self::BOARD_KEY);
	$board->setGId(Util::generateUserUniqueId());
	$board->setUserId(0);

	$firstRow = DashboardRow::factoryWithHorizontalCells(1);
	$firstRow->setWeight(1);
	$periodCompareGraph = self::buildPeriodCompareLinearGraph();
	$periodCompareGraph->setWeight($firstRow->getLayoutMap()['elements'][0]['id']);
	$firstRow->addWidgets($periodCompareGraph);
	$board->addRows($firstRow);

	$secondRow = DashboardRow::factoryWithHorizontalCells(1);
	$secondRow->setWeight(2);
	$salesPeriodCompareGridByDate = self::buildPeriodCompareGridByDate();
	$salesPeriodCompareGridByDate->setWeight($secondRow->getLayoutMap()['elements'][0]['id']);
	$secondRow->addWidgets($salesPeriodCompareGridByDate);

	$board->addRows($secondRow);

	return $board;
}