Ejemplo n.º 1
0
 /**
  * Signs user up.
  *
  * @return Book|null the saved model or null if saving fails
  */
 public function AddForm()
 {
     if ($this->validate()) {
         $model = new AddForm();
         $model->bookname = $this->bookname;
         $model->authorname = $this->authorname;
         $model->about = $this->about;
         $model->page = $this->page;
         // $book->generateAuthKey();
         if ($model->save()) {
             return $model;
         }
     }
     return null;
 }