mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
UIContentBlock: Add PrependSubBlock() to add a block in first position
This commit is contained in:
@@ -71,6 +71,19 @@ class UIContentBlock extends UIBlock implements iUIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add $oSubBlock as the first of the sub blocks, while preserving the array indexes
|
||||
*
|
||||
* @param \Combodo\iTop\Application\UI\Base\iUIBlock $oSubBlock
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function PrependSubBlock(iUIBlock $oSubBlock)
|
||||
{
|
||||
$this->aSubBlocks = [$oSubBlock->GetId() => $oSubBlock] + $this->aSubBlocks;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user