N°2844 - Add iUIContentBlock::HasSubBlocks() helper

This commit is contained in:
Molkobain
2021-03-04 15:06:26 +01:00
parent 101a100c1f
commit cf956099ac
4 changed files with 34 additions and 2 deletions

View File

@@ -209,13 +209,23 @@ class PageContent extends UIBlock implements iUIContentBlock {
return null;
}
/**
* @inheritDoc
* @throws \Exception
*/
public function HasSubBlocks(): bool
{
return !empty($this->GetMainBlocks());
}
/**
* Set the MAIN AREA subBlocks
*
* @inheritDoc
* @return $this|\Combodo\iTop\Application\UI\Base\Layout\iUIContentBlock
*/
public function SetSubBlocks(array $aSubBlocks): iUIContentBlock {
public function SetSubBlocks(array $aSubBlocks): iUIContentBlock
{
$this->SetMainBlocks($aSubBlocks);
return $this;