* @package Combodo\iTop\Application\UI\Base\Component\Html * @since 3.0.0 */ class Html extends UIBlock { // Overloaded constants public const BLOCK_CODE = 'ibo-html'; public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/html/layout'; /** @var string $sHtml The raw HTML, must be already sanitized */ protected $sHtml; /** * Html constructor. * * @param string $sHtml * @param string|null $sId */ public function __construct(string $sHtml = '', ?string $sId = null) { $this->sHtml = $sHtml; parent::__construct($sId); } /** * Return the raw HTML, should have been sanitized * * @return string */ public function GetHtml(): string { return $this->sHtml; } /** * Set the raw HTML, must be already sanitized * * @param string $sHtml * * @return $this */ public function SetHtml(string $sHtml) { $this->sHtml = $sHtml; return $this; } /** * Add HTML, must be already sanitized * * @param string $sHtml * * @return $this */ public function AddHtml(string $sHtml) { $this->sHtml .= $sHtml; return $this; } }