menuRepo = $menuRepo; $this->themeCore = $themeCore; } /** * @throws BindingResolutionException */ public function with(): array { // These needs to live in the main app since the menu open or closed changes the entire html layout if (session()->exists('userdata')) { session(['menuState' => $this->menuRepo->getSubmenuState('mainMenu') ?: 'open']); } $menuType = $this->menuRepo->getSectionMenuType(FrontcontrollerCore::getCurrentRoute(), 'project'); $announcement = null; $announcement = self::dispatch_filter('appAnnouncement', $announcement); return [ 'module' => strtolower(FrontcontrollerCore::getModuleName()), 'section' => $menuType, 'appAnnouncement' => $announcement, 'themeBgUrl' => $this->themeCore->getBackgroundImage(), ]; } }