mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°6179 - Tooltip attribute in field component (in Twig) (#478)
N°6179 - Tooltip attribute in field component (in Twig) (#478)
This commit is contained in:
@@ -9,6 +9,7 @@ namespace Combodo\iTop\Application\UI\Base\Component\Field;
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
|
||||
use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
use utils;
|
||||
|
||||
/**
|
||||
* @since 3.0.0
|
||||
@@ -45,6 +46,11 @@ class Field extends UIContentBlock
|
||||
protected $sValueRaw;
|
||||
/** @var string */
|
||||
protected $sLabel;
|
||||
/**
|
||||
* @var string
|
||||
* @since 3.1.0
|
||||
*/
|
||||
protected $sDescription = '';
|
||||
/** @var string */
|
||||
protected $sValueId;
|
||||
|
||||
@@ -354,4 +360,34 @@ class Field extends UIContentBlock
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @since 3.1.0
|
||||
*/
|
||||
public function GetDescription(): string
|
||||
{
|
||||
return $this->sDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sDescription
|
||||
*
|
||||
* @return $this
|
||||
* @since 3.1.0
|
||||
*/
|
||||
public function SetDescription(string $sDescription)
|
||||
{
|
||||
$this->sDescription = $sDescription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/*
|
||||
* @return bool
|
||||
* @since 3.1.0
|
||||
*/
|
||||
public function HasDescription(): bool
|
||||
{
|
||||
return utils::IsNotNullOrEmptyString($this->GetDescription());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user