Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-backend
Model
Menu
Builder
Command
Add.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Backend\Model\Menu\Builder\Command
;
7
13
class
Add
extends
\Magento\Backend\Model\Menu\Builder\AbstractCommand
14
{
20
protected
$_requiredParams
= [
"id"
,
"title"
,
"module"
,
"resource"
];
21
29
public
function
chain
(\
Magento
\Backend\Model\
Menu
\
Builder
\
AbstractCommand
$command)
30
{
31
if
($command instanceof \
Magento
\Backend\Model\
Menu
\
Builder
\Command\
Add
) {
32
throw
new \InvalidArgumentException(
"Two 'add' commands cannot have equal id ("
. $command->getId() .
")"
);
33
}
34
return
parent::chain($command);
35
}
36
43
protected
function
_execute
(array $itemParams)
44
{
45
foreach
($this->_data as $key =>
$value
) {
46
$itemParams[$key] = isset($itemParams[$key]) ? $itemParams[$key] :
$value
;
47
}
48
return
$itemParams;
49
}
50
}
Magento\Backend\Model\Menu\Builder\AbstractCommand
Definition:
AbstractCommand.php:13
Magento\Backend\Model\Menu\Builder\Command\Add\_execute
_execute(array $itemParams)
Definition:
Add.php:43
Magento\Backend\Model\Menu\Builder\Command\Add\$_requiredParams
$_requiredParams
Definition:
Add.php:20
Magento\Backend\Model\Menu
Definition:
Menu.php:20
$value
$value
Definition:
gender.phtml:16
Magento\Backend\Model\Menu\Builder\Command
Definition:
Add.php:6
Magento\Backend\Model\Menu\Builder\Command\Add\chain
chain(\Magento\Backend\Model\Menu\Builder\AbstractCommand $command)
Definition:
Add.php:29
Magento\Backend\Model\Menu\Builder
Definition:
Builder.php:14
Magento\Backend\Model\Menu\Builder\Command\Add
Definition:
Add.php:13
Magento