Closed nadar closed 4 years ago
When using teardown() in the menu $baseItem->with('hidden')->getTeardown() hidden items should be included in the teardown() process
$baseItem->with('hidden')->getTeardown()
$parent = $this->with($this->_with)->getParent(); $current = $this; $data[$current->id] = $current; while ($parent) { $data[$parent->id] = $parent; $parent = $parent->with($this->_with)->getParent(); } return Query::createArrayIterator(array_reverse($data, true), $this->lang, $this->_with, false);
The array iterator filter seems not to have this information anymore whether to include hidden elements or not:
public function accept() { $event = new MenuItemEvent(); $event->item = $this->current(); if (isset($this->getInnerIterator()->with['hidden'])) { $event->visible = true; } Yii::$app->menu->trigger(Menu::EVENT_ON_ITEM_FIND, $event); return $event->visible; }
if (isset($this->getInnerIterator()->with['hidden'])) { $event->visible = true; }
should set to true, but does not. is the with information gone?
When using teardown() in the menu
$baseItem->with('hidden')->getTeardown()
hidden items should be included in the teardown() processThe array iterator filter seems not to have this information anymore whether to include hidden elements or not:
should set to true, but does not. is the with information gone?