mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°3123 - Refactor Directories
This commit is contained in:
42
sources/application/UI/Base/Component/Badge/Badge.php
Normal file
42
sources/application/UI/Base/Component/Badge/Badge.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\Badge;
|
||||
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
|
||||
|
||||
class Badge extends UIContentBlock
|
||||
{
|
||||
/** @var string */
|
||||
protected $sColor;
|
||||
|
||||
public function __construct(string $sColor)
|
||||
{
|
||||
parent::__construct(null, "ibo-badge ibo-badge-is-{$sColor}");
|
||||
$this->SetColor($sColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetColor(): ?string
|
||||
{
|
||||
return $this->sColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sColor
|
||||
*
|
||||
* @return Badge
|
||||
*/
|
||||
public function SetColor(string $sColor): Badge
|
||||
{
|
||||
$this->sColor = $sColor;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user