mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 13:08:45 +02:00
N°8955 New UIBlocks for setup
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\Badge;
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
|
||||
class Badge extends UIBlock{
|
||||
class Badge extends UIBlock
|
||||
{
|
||||
public const BLOCK_CODE = 'ibo-badge';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/badge/layout';
|
||||
|
||||
@@ -24,13 +26,18 @@ class Badge extends UIBlock{
|
||||
/** @var string ENUM_COLOR_SCHEME_CYAN */
|
||||
public const ENUM_COLOR_SCHEME_CYAN = 'cyan';
|
||||
/** @var string DEFAULT_COLOR_SCHEME */
|
||||
public const ENUM_COLOR_SCHEME_GREY = 'grey';
|
||||
/** @var string DEFAULT_COLOR_SCHEME */
|
||||
public const ENUM_COLOR_SCHEME_BLUE_GREY = 'blue-grey';
|
||||
/** @var string DEFAULT_COLOR_SCHEME */
|
||||
public const ENUM_COLOR_SCHEME_ORANGE = 'orange';
|
||||
/** @var string DEFAULT_COLOR_SCHEME */
|
||||
public const DEFAULT_COLOR_SCHEME = self::ENUM_COLOR_SCHEME_NEUTRAL;
|
||||
private string $sLabel;
|
||||
private string $sColor;
|
||||
private string $sTooltip;
|
||||
|
||||
|
||||
public function __construct(string $sLabel, string $sColor = self::DEFAULT_COLOR_SCHEME,string $sTooltip = '', string $sId = null)
|
||||
public function __construct(string $sLabel, string $sColor = self::DEFAULT_COLOR_SCHEME, string $sTooltip = '', string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
@@ -42,14 +49,16 @@ class Badge extends UIBlock{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetTooltip(): string {
|
||||
public function GetTooltip(): string
|
||||
{
|
||||
return $this->sTooltip;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sTooltip
|
||||
*/
|
||||
public function SetTooltip(string $sTooltip) {
|
||||
public function SetTooltip(string $sTooltip)
|
||||
{
|
||||
$this->sTooltip = $sTooltip;
|
||||
return $this;
|
||||
}
|
||||
@@ -91,4 +100,4 @@ class Badge extends UIBlock{
|
||||
$this->sColor = $sColor;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user