Dashlet form in new dashboard layout (suite)

This commit is contained in:
Benjamin DALSASS
2026-01-08 15:30:51 +01:00
parent b014b9f638
commit 4a8804b8ac
9 changed files with 218 additions and 148 deletions

View File

@@ -2,27 +2,32 @@
namespace Combodo\iTop\Application\UI\Base\Component\Dashlet;
use Combodo\iTop\Application\UI\Base\UIBlock;
use Dashlet;
class DashletWrapper extends UIBlock {
public const BLOCK_CODE = 'ibo-dashlet-wrapper';
class DashletWrapper extends UIBlock
{
public const BLOCK_CODE = 'ibo-dashlet-wrapper';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/dashlet/dashlet-wrapper';
protected $oDashlet;
protected DashletContainer $oDashletContainer;
protected $sDashletClass;
protected $sDashletId;
private array $aFormViewData;
public function __construct($oDashlet, ?string $sDashletId = null, ?string $sDashletClass = null) {
public function __construct($oDashlet, string $sDashletClass, ?string $sDashletId = null, array $aFormViewData = [])
{
parent::__construct(null);
$this->oDashlet = $oDashlet;
$this->oDashletContainer = $oDashlet;
$this->sDashletId = $sDashletId;
$this->sDashletClass = $sDashletClass;
$this->aFormViewData = $aFormViewData;
}
public function GetDashlet() {
return $this->oDashlet;
public function GetDashlet()
{
return $this->oDashletContainer;
}
public function GetDashletId(): ?string
@@ -48,4 +53,9 @@ class DashletWrapper extends UIBlock {
return $this;
}
public function GetFormViewData()
{
return $this->aFormViewData;
}
}