N°2847 - FieldSet and Fields

This commit is contained in:
Eric
2020-09-23 08:55:58 +02:00
parent 33f11d2a43
commit 98d2e42bad
21 changed files with 341 additions and 119 deletions

View File

@@ -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