public function run() { if (!$this->menuId) { $this->menuId = self::MAIN_MENU_ID; } $menuItems = Menu::getMenu($this->menuId); return $this->render('NavBar', ['menuItems' => $menuItems, 'options' => $this->options, 'type' => $this->type]); }