mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°3581 - Dashlet: Remove coupling with DashletText in DashletHeaderStatic
This commit is contained in:
@@ -8,8 +8,17 @@
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\Dashlet;
|
||||
|
||||
|
||||
/**
|
||||
* Class DashletHeaderStatic
|
||||
*
|
||||
* @internal
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @since 3.0.0
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Dashlet
|
||||
*/
|
||||
class DashletHeaderStatic extends DashletContainer
|
||||
{
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-dashlet-header-static';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/dashlet/dashlet-header-static';
|
||||
|
||||
@@ -17,23 +26,20 @@ class DashletHeaderStatic extends DashletContainer
|
||||
protected $sTitle;
|
||||
/** @var string */
|
||||
protected $sIconUrl;
|
||||
/** @var string */
|
||||
protected $sText;
|
||||
|
||||
/**
|
||||
* DashletHeaderStatic constructor.
|
||||
*
|
||||
* @param string $sTitle
|
||||
* @param string $sIconUrl
|
||||
* @param string $sText
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct(string $sId = null, string $sTitle, string $sIconUrl, string $sText = '')
|
||||
public function __construct(string $sTitle, string $sIconUrl, string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
$this->sTitle = $sTitle;
|
||||
$this->sIconUrl = $sIconUrl;
|
||||
$this->sText = $sText;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,11 +54,12 @@ class DashletHeaderStatic extends DashletContainer
|
||||
/**
|
||||
* @param string $sTitle
|
||||
*
|
||||
* @return DashletHeaderStatic
|
||||
* @return $this
|
||||
*/
|
||||
public function SetTitle(string $sTitle): DashletHeaderStatic
|
||||
public function SetTitle(string $sTitle)
|
||||
{
|
||||
$this->sTitle = $sTitle;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -67,32 +74,12 @@ class DashletHeaderStatic extends DashletContainer
|
||||
/**
|
||||
* @param string $sIconUrl
|
||||
*
|
||||
* @return DashletHeaderStatic
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIconUrl(string $sIconUrl): DashletHeaderStatic
|
||||
public function SetIconUrl(string $sIconUrl)
|
||||
{
|
||||
$this->sIconUrl = $sIconUrl;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetText(): string
|
||||
{
|
||||
return $this->sText;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sText
|
||||
*
|
||||
* @return DashletHeaderStatic
|
||||
*/
|
||||
public function SetText(string $sText): DashletHeaderStatic
|
||||
{
|
||||
$this->sText = $sText;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user