예제 #1
0
 /**
  * execute
  *
  * @param \Form\Form $form
  */
 public function update($form)
 {
     $fac = $this->getConfig()->getPluginFactory();
     $plugin = $fac->getPlugin($this->getNamespace());
     $arr = \Tk\ArrayObject::createArray($form->getFormValuesArray());
     if ($form->hasErrors()) {
         return;
     }
     $plugin->getDataArray()->importFormArray($arr);
     $plugin->getDataArray()->saveToDb();
     \Mod\Notice::addSuccess('Settings Saved.');
 }