N°2847 - Separate inline scripts and css from html in the rendering of pages

This commit is contained in:
Eric
2020-09-18 09:36:39 +02:00
parent e83dfe5982
commit 9cd719ab56
28 changed files with 310 additions and 378 deletions

View File

@@ -39,6 +39,9 @@ class TabContainer extends UIContentBlock
public const BLOCK_CODE = 'ibo-tabcontainer';
public const HTML_TEMPLATE_REL_PATH = 'layouts/tabcontainer/layout';
public const JS_TEMPLATE_REL_PATH = 'layouts/tabcontainer/layout';
public const JS_FILES_REL_PATH = [
'js/layouts/tab-container.js'
];
private $sName;
private $sPrefix;
@@ -122,4 +125,24 @@ class TabContainer extends UIContentBlock
}
return parent::AddSubBlock($oSubBlock);
}
/**
* Return tab list
*
* @return array
*/
public function Get(): array
{
$aTabs = [];
foreach ($this->GetSubBlocks() as $oTab) {
$aTabs[] = $oTab->GetParameters();
}
return [
'sBlockId' => $this->GetId(),
'aTabs' => $aTabs
];
}
}