mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°8641 - Dashboard editor front-end first commit for Form SDK integration.
* No dashlet edition * Dashboard are not persisted * Unable to load a dashboard from an endpoint (refresh) * Grid library need proper npm integration
This commit is contained in:
163
sources/Application/UI/Base/Layout/DashletPanel/DashletEntry.php
Normal file
163
sources/Application/UI/Base/Layout/DashletPanel/DashletEntry.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Layout\DashletPanel;
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
use utils;
|
||||
|
||||
class DashletEntry extends UIBlock {
|
||||
public const BLOCK_CODE = 'ibo-dashlet-entry';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/dashlet-panel/dashlet-entry';
|
||||
|
||||
protected $sDashletLabel;
|
||||
protected $sDashletClass;
|
||||
protected $sDashletIcon;
|
||||
protected $sDashletDescription;
|
||||
protected $sDashletMinWidth;
|
||||
protected $sDashletMinHeight;
|
||||
protected $sDashletPreferredWidth;
|
||||
protected $sDashletPreferredHeight;
|
||||
|
||||
|
||||
public function __construct(string $sDashletClass, string $sDashletLabel, string $sDashletDescription, string $sDashletIconRelUrl, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
$this->sDashletClass = $sDashletClass;
|
||||
$this->sDashletLabel = $sDashletLabel;
|
||||
$this->sDashletIcon = utils::GetAbsoluteUrlAppRoot().$sDashletIconRelUrl;
|
||||
$this->sDashletDescription = $sDashletDescription;
|
||||
|
||||
$this->AddDataAttribute('role', static::BLOCK_CODE);
|
||||
}
|
||||
|
||||
public function GetDashletLabel(): string
|
||||
{
|
||||
return $this->sDashletLabel;
|
||||
}
|
||||
|
||||
public function SetDashletLabel(string $sDashletLabel): DashletEntry
|
||||
{
|
||||
$this->sDashletLabel = $sDashletLabel;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetDashletClass(): string
|
||||
{
|
||||
return $this->sDashletClass;
|
||||
}
|
||||
|
||||
public function SetDashletClass(string $sDashletClass): DashletEntry
|
||||
{
|
||||
$this->sDashletClass = $sDashletClass;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetDashletIcon(): string
|
||||
{
|
||||
return $this->sDashletIcon;
|
||||
}
|
||||
|
||||
public function SetDashletIcon(string $sDashletIcon): DashletEntry
|
||||
{
|
||||
$this->sDashletIcon = $sDashletIcon;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetDashletDescription(): string
|
||||
{
|
||||
return $this->sDashletDescription;
|
||||
}
|
||||
|
||||
public function SetDashletDescription(string $sDashletDescription): DashletEntry
|
||||
{
|
||||
$this->sDashletDescription = $sDashletDescription;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetDashletPreferredHeight()
|
||||
{
|
||||
return $this->sDashletPreferredHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $sDashletPreferredHeight
|
||||
*
|
||||
* @return DashletEntry
|
||||
*/
|
||||
public function SetDashletPreferredHeight($sDashletPreferredHeight)
|
||||
{
|
||||
$this->sDashletPreferredHeight = $sDashletPreferredHeight;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetDashletPreferredWidth()
|
||||
{
|
||||
return $this->sDashletPreferredWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $sDashletPreferredWidth
|
||||
*
|
||||
* @return DashletEntry
|
||||
*/
|
||||
public function SetDashletPreferredWidth($sDashletPreferredWidth)
|
||||
{
|
||||
$this->sDashletPreferredWidth = $sDashletPreferredWidth;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetDashletMinHeight()
|
||||
{
|
||||
return $this->sDashletMinHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $sDashletMinHeight
|
||||
*
|
||||
* @return DashletEntry
|
||||
*/
|
||||
public function SetDashletMinHeight($sDashletMinHeight)
|
||||
{
|
||||
$this->sDashletMinHeight = $sDashletMinHeight;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetDashletMinWidth()
|
||||
{
|
||||
return $this->sDashletMinWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $sDashletMinWidth
|
||||
*
|
||||
* @return DashletEntry
|
||||
*/
|
||||
public function SetDashletMinWidth($sDashletMinWidth)
|
||||
{
|
||||
$this->sDashletMinWidth = $sDashletMinWidth;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user