mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°2847 - Add method to add several blocks at once to a content area (tUIContentAreas)
This commit is contained in:
@@ -93,12 +93,28 @@ class PageContent extends UIBlock implements iUIContentBlock {
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function AddMainBlock(iUIBlock $oBlock) {
|
||||
public function AddMainBlock(iUIBlock $oBlock)
|
||||
{
|
||||
$this->AddBlockToContentArea(static::ENUM_CONTENT_AREA_MAIN, $oBlock);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all $aBlocks to the main content area
|
||||
*
|
||||
* @param \Combodo\iTop\Application\UI\Base\iUIBlock[] $aBlocks
|
||||
*
|
||||
* @return $this
|
||||
* @uses static::AddBlocksToContentArea()
|
||||
*/
|
||||
public function AddMainBlocks(array $aBlocks)
|
||||
{
|
||||
$this->AddBlocksToContentArea(static::ENUM_CONTENT_AREA_MAIN, $aBlocks);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the main block identified by $sBlockId.
|
||||
* Note that if no block with that ID exists, it will proceed silently.
|
||||
@@ -107,7 +123,8 @@ class PageContent extends UIBlock implements iUIContentBlock {
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function RemoveMainBlock(string $sBlockId) {
|
||||
public function RemoveMainBlock(string $sBlockId)
|
||||
{
|
||||
$this->RemoveBlockFromContentArea(static::ENUM_CONTENT_AREA_MAIN, $sBlockId);
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user