public function generalConfigAction() { $storage = new ConfigStorage($this->serviceLocator->get('adb')); $v = $storage->getValue('test-value'); echo $v; return ['entireConfig' => $storage->getConfiguration(null), 'location' => self::LOCATION_ADMIN_CONFIG]; }
/** * @param MvcEvent $e * @return void */ public function onDispatch(MvcEvent $e) { parent::onDispatch($e); $userStorage = new UserStorage($this->serviceLocator->get('ADB')); $userStorage->userLoggedIn(); $loggedIn = SessionStorage::getValue('user-logged-in'); $this->layout()->setVariable('loggedIn', $loggedIn); if ($loggedIn) { $this->layout()->setVariable('userData', $userStorage->fetchCurrentUser()); } else { $this->layout()->setVariable('userData', ['username' => 'not logged in']); } $configStorage = new ConfigStorage($this->serviceLocator->get('ADB')); $this->layout()->setVariable('configuration', $configStorage->getConfiguration(1)); }