formSubmit() 보호된 메소드

Called after on post-init hook when form is submitted.
protected formSubmit ( Form $form )
$form Form Form which was submitted
예제 #1
0
 function formSubmit($form)
 {
     if ($form->model->id) {
         //            TODO- check if class is dirty or changed and if fee associated with the old class is still applied to this
         //            STUDENT then throw messgae and return
     } else {
         $scl = $this->add('Model_Scholar');
         $scl->addCondition('scholar_no', $this->form->data['scholar_no']);
         $scl->tryLoadAny();
         if ($scl->loaded()) {
             $this->form->displayError('scholar_no', "Duplicate Scholar No " . $this->form->data['scholar_no']);
             return;
         }
     }
     parent::formSubmit($form);
     $this->form->model->associateClassFeeses();
 }