* @package Combodo\iTop\Application\UI\Component\Alert\Alert * @since 2.8.0 */ class Alert extends UIBlock { // Overloaded constants const BLOCK_CODE = 'ibo-alert'; const HTML_TEMPLATE_REL_PATH = 'components/alert/layout'; const JS_TEMPLATE_REL_PATH = 'components/alert/layout'; /** @var string $sTitle */ protected $sTitle; /** @var array $sMainText */ protected $sMainText; /** @var string $sColor */ protected $sColor; /** * Alert constructor. * * @param string $sId * @param string $sTitle * @param string $sMainText * @param string $sColor */ public function __construct($sId, $sTitle = '', $sMainText = '', $sColor = 'secondary') { $this->sTitle = $sTitle; $this->sMainText = $sMainText; $this->sColor = $sColor; parent::__construct($sId); } /** * @return string */ public function GetTitle() { return $this->sTitle; } /** * @param string $sTitle * @return $this */ public function SetTitle($sTitle) { $this->sTitle = $sTitle; return $this; } /** * @return string */ public function GetMainText() { return $this->sMainText; } /** * @param string $aMainText * @return $this */ public function SetMainText($aMainText) { $this->sMainText = $aMainText; return $this; } /** * @return string */ public function GetColor() { return $this->sColor; } /** * @param string $sColor * @return $this */ public function SetColor($sColor) { $this->sColor = $sColor; return $this; } }