mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 19:18:44 +02:00
N°2847 - refactor twigs
This commit is contained in:
@@ -35,17 +35,16 @@ class AjaxTab extends Tab
|
||||
{
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-ajaxtab';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/tabcontainer/ajaxtab/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/tabcontainer/ajaxtab/layout';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/ajaxtab';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/ajaxtab';
|
||||
|
||||
protected const TAB_TYPE = TabManager::ENUM_TAB_TYPE_AJAX;
|
||||
|
||||
/** @var string */
|
||||
private $sURL;
|
||||
/** @var bool */
|
||||
private $bCache;
|
||||
|
||||
public function GetType(): string
|
||||
{
|
||||
return TabManager::ENUM_TAB_TYPE_AJAX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sHtml
|
||||
*
|
||||
@@ -88,28 +87,28 @@ class AjaxTab extends Tab
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $bCache
|
||||
* @param bool $bCache
|
||||
*
|
||||
* @return AjaxTab
|
||||
*/
|
||||
public function SetCache(string $bCache): self
|
||||
public function SetCache(bool $bCache): self
|
||||
{
|
||||
$this->bCache = $bCache;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
public function GetURL()
|
||||
public function GetURL(): string
|
||||
{
|
||||
return $this->sURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @return string
|
||||
*/
|
||||
public function GetCache()
|
||||
public function GetCache(): string
|
||||
{
|
||||
return $this->bCache ? 'true' : 'false';
|
||||
}
|
||||
|
||||
@@ -32,8 +32,10 @@ class Tab extends UIContentBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-tab';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/layout';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/tab';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/tabcontainer/tab/tab';
|
||||
|
||||
protected const TAB_TYPE = TabManager::ENUM_TAB_TYPE_HTML;
|
||||
|
||||
protected $sTitle;
|
||||
|
||||
@@ -45,7 +47,7 @@ class Tab extends UIContentBlock
|
||||
|
||||
public function GetType(): string
|
||||
{
|
||||
return TabManager::ENUM_TAB_TYPE_HTML;
|
||||
return static::TAB_TYPE;
|
||||
}
|
||||
|
||||
public function GetTitle(): string
|
||||
|
||||
Reference in New Issue
Block a user