N°3536 - Dashboard: Add title, toggler and menu to AttributeDashboard

This commit is contained in:
Eric
2021-03-22 16:46:45 +01:00
parent 3a141def49
commit 574d089c20
16 changed files with 531 additions and 194 deletions

View File

@@ -1,47 +0,0 @@
<?php
/**
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Base\Layout\Dashboard;
use Combodo\iTop\Application\UI\Base\UIBlock;
class DashboardLayout extends UIBlock
{
public const BLOCK_CODE = 'ibo-dashboard';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/dashboard/layout';
/** @var DashboardRow[] */
protected $aDashboardRows;
/** @var int */
protected $iRows;
public function __construct(?string $sId = null)
{
parent::__construct($sId);
$this->aDashboardRows = [];
$this->iRows = 0;
}
/**
*
* @param \Combodo\iTop\Application\UI\Base\Layout\Dashboard\DashboardRow $oDashboardRow
*
* @return DashboardLayout
*/
public function AddDashboardRow(DashboardRow $oDashboardRow): DashboardLayout
{
$oDashboardRow->SetRowIndex($this->iRows);
$this->aDashboardRows[] = $oDashboardRow;
$this->iRows++;
return $this;
}
public function GetSubBlocks()
{
return $this->aDashboardRows;
}
}