31 $this->_itemFactory = $menuItemFactory;
42 if (!isset($this->_commands[$command->getId()])) {
43 $this->_commands[$command->getId()] = $command;
45 $this->_commands[$command->getId()]->chain($command);
57 public function getResult(\
Magento\Backend\Model\
Menu $menu)
64 foreach ($this->_commands as
$id => $command) {
80 $menu->add(
$item,
null, $sortOrder);
82 if (!isset(
$items[$parentId])) {
83 throw new \OutOfRangeException(sprintf(
'Specified invalid parent id (%s)', $parentId));
85 if (isset(
$params[$parentId][
'removed'])) {
88 $items[$parentId]->getChildren()->add(
$item,
null, $sortOrder);
105 return $params[$paramName] ?? $defaultValue;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]