aDashboardRows = []; $this->iRows = 0; $this->sTitle = ''; $this->oToolbar = new UIContentBlock(null, ['ibo-dashboard--top-bar-toolbar']); } /** * * @param \Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardRow $oDashboardRow * * @return $this */ public function AddDashboardRow(DashboardRow $oDashboardRow) { $oDashboardRow->SetRowIndex($this->iRows); $this->aDashboardRows[] = $oDashboardRow; $this->iRows++; return $this; } public function GetSubBlocks(): array { return array_merge($this->aDashboardRows, [$this->oToolbar]); } /** * @see static::$sTitle * @return bool */ public function HasTitle(): bool { return strlen($this->sTitle) > 0; } /** * @return string */ public function GetTitle(): string { return $this->sTitle; } /** * @see static::$oToolbar * @return bool */ public function HasToolbar(): bool { return $this->oToolbar->HasSubBlocks(); } /** * @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock */ public function GetToolbar() { return $this->oToolbar; } public function SetTitle(string $sTitle) { $this->sTitle = $sTitle; } /** * @return \Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardRow[] */ public function GetDashboardRows(): array { return $this->aDashboardRows; } }