N°2847 - Add Title component

* Add id to button factory
 * Rework of Configuration File Editor page
This commit is contained in:
Eric
2020-09-18 18:15:03 +02:00
parent 08eada82f4
commit 74160d2447
13 changed files with 287 additions and 215 deletions

View File

@@ -0,0 +1,51 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Component\Title;
use Combodo\iTop\Application\UI\UIBlock;
/**
* Class Title
*
* @package Combodo\iTop\Application\UI\Component\Title
*/
class Title extends UIBlock
{
// Overloaded constants
public const BLOCK_CODE = 'ibo-title';
public const HTML_TEMPLATE_REL_PATH = 'components/title/layout';
public const JS_TEMPLATE_REL_PATH = 'components/title/layout';
/** @var string */
protected $sTitle;
/** @var int */
protected $iLevel;
public function __construct(string $sTitle = '', int $iLevel = 1, ?string $sId = null)
{
parent::__construct($sId);
$this->sTitle = $sTitle;
$this->iLevel = $iLevel;
}
/**
* @return string
*/
public function GetTitle(): string
{
return $this->sTitle;
}
/**
* @return int
*/
public function GetLevel(): int
{
return $this->iLevel;
}
}