|
9 | 9 | /**
|
10 | 10 | * Backend menu block
|
11 | 11 | *
|
12 |
| - * @api |
13 |
| - * @method \Magento\Backend\Block\Menu setAdditionalCacheKeyInfo(array $cacheKeyInfo) |
| 12 | + * @method $this setAdditionalCacheKeyInfo(array $cacheKeyInfo) |
14 | 13 | * @method array getAdditionalCacheKeyInfo()
|
15 |
| - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) |
16 | 14 | * @api
|
17 | 15 | * @since 100.0.2
|
| 16 | + * |
| 17 | + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) |
18 | 18 | */
|
19 | 19 | class Menu extends \Magento\Backend\Block\Template
|
20 | 20 | {
|
@@ -75,21 +75,22 @@ class Menu extends \Magento\Backend\Block\Template
|
75 | 75 | private $anchorRenderer;
|
76 | 76 |
|
77 | 77 | /**
|
78 |
| - * @var ConfigInterface |
| 78 | + * @var \Magento\Framework\App\Route\ConfigInterface |
79 | 79 | */
|
80 | 80 | private $routeConfig;
|
81 | 81 |
|
82 | 82 | /**
|
83 |
| - * @param Template\Context $context |
| 83 | + * @param \Magento\Backend\Block\Template\Context $context |
84 | 84 | * @param \Magento\Backend\Model\UrlInterface $url
|
85 | 85 | * @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory
|
86 | 86 | * @param \Magento\Backend\Model\Auth\Session $authSession
|
87 | 87 | * @param \Magento\Backend\Model\Menu\Config $menuConfig
|
88 | 88 | * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
|
89 |
| - * @param \Magento\Framework\App\Route\ConfigInterface $routeConfig |
90 | 89 | * @param array $data
|
91 | 90 | * @param MenuItemChecker|null $menuItemChecker
|
92 | 91 | * @param AnchorRenderer|null $anchorRenderer
|
| 92 | + * @param \Magento\Framework\App\Route\ConfigInterface|null $routeConfig |
| 93 | + * |
93 | 94 | * @SuppressWarnings(PHPMD.ExcessiveParameterList)
|
94 | 95 | */
|
95 | 96 | public function __construct(
|
@@ -141,6 +142,7 @@ protected function _getAnchorLabel($menuItem)
|
141 | 142 |
|
142 | 143 | /**
|
143 | 144 | * Render menu item mouse events
|
| 145 | + * |
144 | 146 | * @param \Magento\Backend\Model\Menu\Item $menuItem
|
145 | 147 | * @return string
|
146 | 148 | */
|
@@ -216,7 +218,7 @@ protected function _callbackSecretKey($match)
|
216 | 218 | {
|
217 | 219 | $routeId = $this->routeConfig->getRouteByFrontName($match[1]);
|
218 | 220 | return \Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME . '/' . $this->_url->getSecretKey(
|
219 |
| - $routeId, |
| 221 | + $routeId ?: $match[1], |
220 | 222 | $match[2],
|
221 | 223 | $match[3]
|
222 | 224 | );
|
@@ -354,7 +356,7 @@ protected function _columnBrake($items, $limit)
|
354 | 356 | * @param \Magento\Backend\Model\Menu\Item $menuItem
|
355 | 357 | * @param int $level
|
356 | 358 | * @param int $limit
|
357 |
| - * @param $id int |
| 359 | + * @param int|null $id |
358 | 360 | * @return string HTML code
|
359 | 361 | */
|
360 | 362 | protected function _addSubMenu($menuItem, $level, $limit, $id = null)
|
|
0 commit comments