Make panels collapsible

This commit is contained in:
Stephen Abello
2021-03-02 09:58:13 +01:00
parent cf72c2ef8f
commit 752508b724
4 changed files with 69 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ class Panel extends UIContentBlock
// Overloaded constants
public const BLOCK_CODE = 'ibo-panel';
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/panel/layout';
public const DEFAULT_JS_TEMPLATE_REL_PATH = 'base/components/panel/layout';
// Specific constants
/** @var string ENUM_COLOR_PRIMARY */
@@ -91,6 +92,8 @@ class Panel extends UIContentBlock
protected $sColor;
/** @var string $sSubTitle */
protected $sSubTitle;
/** @var bool $bIsCollapsible */
protected $bIsCollapsible;
/**
* Panel constructor.
@@ -108,6 +111,7 @@ class Panel extends UIContentBlock
$this->sColor = $sColor;
$this->SetMainBlocks([]);
$this->SetToolBlocks([]);
$this->bIsCollapsible = false;
}
/**
@@ -170,6 +174,27 @@ class Panel extends UIContentBlock
return $this;
}
/**
* @return bool
*/
public function isIsCollapsible(): bool
{
return $this->bIsCollapsible;
}
/**
* @param bool $bIsCollapsible
*
* @return $this
*/
public function SetIsCollapsible(bool $bIsCollapsible)
{
$this->bIsCollapsible = $bIsCollapsible;
return $this;
}
//----------------------
// Specific content area
//----------------------