/** * @param $site */ protected function setSiteAndResetCore($site) { $this->moduleData->setSite($site); // when switching the site, reset the core $this->moduleData->setCore(''); $this->moduleDataStorageService->persistModuleData($this->moduleData); }
/** * @return void */ protected function resolveSite() { $this->site = $this->moduleData->getSite(); if (!$this->site instanceof Site) { $this->initializeSiteFromFirstAvailableAndStoreInModuleData(); } $rootPageId = $this->site instanceof Site ? $this->site->getRootPageId() : 0; if ($rootPageId > 0 && !Util::pageExists($rootPageId)) { $this->initializeSiteFromFirstAvailableAndStoreInModuleData(); } }
/** * Sets the core to work with. * * @param string $core The core path to use * @param string $module Module to forward to after setting the core * @return void */ public function setCoreAction($core, $module = 'Overview') { $this->moduleData->setCore($core); $this->moduleDataStorageService->persistModuleData($this->moduleData); $this->forwardToModule($module); }