public function process(Form $form) { foreach ($form->values as $key => $value) { $this->setting->set($key, $value); } $this->setting->flush(); }
protected function createComponentAdminControl() { $adminControl = $this->adminControlFactory->create(); $adminControl->setUserName($this->user->identity->name)->setUserImage('images/user.png'); $adminControl->setProfileUrl($this->link('User:update', ['id' => $this->user->id])); $adminControl->setSkin($this->setting->get('skin', 'red')); $adminControl->onLoggedOut[] = function () { $this->redirect('Sign:in'); }; return $adminControl; }