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
Block
MenuItemChecker.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Backend\Block
;
7
8
use
Magento\Backend\Model\Menu\Item
;
9
13
class
MenuItemChecker
14
{
26
public
function
isItemActive
($activeItem,
Item
$item
, $level)
27
{
28
$output
=
false
;
29
30
if
($level == 0
31
&& $activeItem instanceof \
Magento
\Backend\Model\
Menu
\
Item
32
&& $this->isActiveItemEqualOrChild($activeItem,
$item
)
33
) {
34
$output
=
true
;
35
}
36
return
$output
;
37
}
38
44
private
function
isActiveItemEqualOrChild($activeItem,
$item
)
45
{
46
return
($activeItem->getId() ==
$item
->getId())
47
|| (
$item
->getChildren()->get($activeItem->getId()) !==
null
);
48
}
49
}
Magento\Backend\Model\Menu\Item
Definition:
Item.php:19
Magento\Backend\Block\Menu
Definition:
Menu.php:19
Magento\Backend\Block
$item
$item
Definition:
partial_invoice.php:27
Magento\Backend\Block\MenuItemChecker
Definition:
MenuItemChecker.php:13
Magento\Backend\Block\MenuItemChecker\isItemActive
isItemActive($activeItem, Item $item, $level)
Definition:
MenuItemChecker.php:26
$output
$output
Definition:
classmap_generator.php:100
Magento
Magento\Backend\Model\Menu\Item
Definition:
Factory.php:6