mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°3914 - Popover menu: Add method to add several items in a section at once
This commit is contained in:
@@ -461,6 +461,24 @@ class PopoverMenu extends UIBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all $aItems to the $sSectionId after the existing items
|
||||
*
|
||||
* @param string $sSectionId
|
||||
* @param PopoverMenuItem[] $aItems
|
||||
*
|
||||
* @return $this
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function AddItems(string $sSectionId, array $aItems)
|
||||
{
|
||||
foreach($aItems as $oItem){
|
||||
$this->AddItem($sSectionId, $oItem);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set all $aItems at once in the $sSectionId, overwriting all existing.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user