mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
N°6179 - Tooltip attribute in field component (in Twig)
This commit is contained in:
@@ -46,6 +46,8 @@ class Field extends UIContentBlock
|
||||
/** @var string */
|
||||
protected $sLabel;
|
||||
/** @var string */
|
||||
protected $sTooltip = '';
|
||||
/** @var string */
|
||||
protected $sValueId;
|
||||
|
||||
/** @var string */
|
||||
@@ -354,4 +356,28 @@ class Field extends UIContentBlock
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetTooltip(): string
|
||||
{
|
||||
return $this->sTooltip;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sTooltip
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetTooltip(string $sTooltip)
|
||||
{
|
||||
$this->sTooltip = $sTooltip;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function HasTooltip() : bool
|
||||
{
|
||||
return $this->GetTooltip() !== '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user