SetGrid($oDashboardGrid); foreach ($aDashlets as $aPosDashlet) { /** @var \Dashlet $oDashlet */ $oDashlet = $aPosDashlet['dashlet']; if ($oDashlet::IsVisible()) { $sDashletId = $oDashlet->GetID(); $sDashletClass = get_class($oDashlet); $aDashletDenormalizedProperties = $oDashlet->GetDenormalizedProperties(); $aDashletsInfo = $sDashletClass::GetInfo(); // Also set minimal height/width $iPositionX = $aPosDashlet['position_x']; $iPositionY = $aPosDashlet['position_y']; $iWidth = max($aPosDashlet['width'], array_key_exists('min_width', $aDashletsInfo) ? $aDashletsInfo['min_width'] : 1); $iHeight = max($aPosDashlet['height'], array_key_exists('min_height', $aDashletsInfo) ? $aDashletsInfo['min_height'] : 1); $oDashboardGrid->AddDashlet($oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams), $sDashletId, $sDashletClass, $aDashletDenormalizedProperties, $iPositionX, $iPositionY, $iWidth, $iHeight); } } return $oDashboardLayout; } /** * @inheritDoc */ public function GetDashletCoordinates($iCellIdx) { $iColNumber = $iCellIdx % 12; $iRowNumber = (int)floor($iCellIdx / 12); return [$iColNumber, $iRowNumber]; } }