aSlots = []; } /** * @return DashboardGridSlot[] */ public function GetSlots(): array { return $this->aSlots; } public function SetSlots(array $aSlots): DashboardGrid { $this->aSlots = $aSlots; return $this; } public function AddSlot(DashboardGridSlot $oSlot): DashboardGrid { $this->aSlots[] = $oSlot; return $this; } public function AddDashlet(UIBlock $oDashlet, string $sDashletId, string $sDashletClass, array $aFormViewData, ?int $iPositionX = null, ?int $iPositionY = null, ?int $iWidth = null, ?int $iHeight = null): DashboardGrid { $oWrapper = new DashletWrapper($oDashlet, $sDashletClass, $sDashletId, $aFormViewData); $oSlot = new DashboardGridSlot(null, $oWrapper, $iPositionX, $iPositionY, $iWidth, $iHeight); $this->AddSlot($oSlot); return $this; } }