mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°2847 - FieldSet and Fields
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
use Combodo\iTop\Application\UI\iUIBlock;
|
||||
use Combodo\iTop\Application\UI\Layout\TabContainer\Tab\Tab;
|
||||
use Combodo\iTop\Application\UI\Layout\TabContainer\TabContainer;
|
||||
|
||||
@@ -56,6 +57,24 @@ class TabManager
|
||||
$this->AddToTab($this->m_sCurrentTabContainer, $this->m_sCurrentTab, $sHtml);
|
||||
}
|
||||
|
||||
public function AddUIBlockToCurrentTab(iUIBlock $oBlock): iUIBlock
|
||||
{
|
||||
$this->AddUIBlockToTab($this->m_sCurrentTabContainer, $this->m_sCurrentTab, $oBlock);
|
||||
return $oBlock;
|
||||
}
|
||||
|
||||
public function AddUIBlockToTab(string $sTabContainer, string $sTabCode, iUIBlock $oBlock, $sTabTitle = null): void
|
||||
{
|
||||
if (!$this->TabExists($sTabContainer, $sTabCode)) {
|
||||
$this->InitTab($sTabContainer, $sTabCode, static::ENUM_TAB_TYPE_HTML, $sTabTitle);
|
||||
}
|
||||
|
||||
$oTab = $this->GetTab($sTabContainer, $sTabCode);
|
||||
|
||||
// Append to the content of the tab
|
||||
$oTab->AddSubBlock($oBlock);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @deprecated 2.8.0
|
||||
|
||||
Reference in New Issue
Block a user