mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°3123 - Refactor Directories
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 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 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user