コード例 #1
0
 public function process(Form $form)
 {
     foreach ($form->values as $key => $value) {
         $this->setting->set($key, $value);
     }
     $this->setting->flush();
 }
コード例 #2
0
 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;
 }