function handle_submitForm_topic_load($formData = array(), $element = '') { $topic = new CWorkPlanContentSectionLoadTopic(); $topic->setAttributes($formData); if ($topic->validate()) { $topic->save(); self::getStatefullFormBean()->getElement($element)->setShow(false); } else { self::getStatefullFormBean()->getElement($element)->setValidationErrors($topic->getValidationErrors()); } }
public function actionSave() { $object = new CWorkPlanContentSectionLoadTopic(); $object->setAttributes(CRequest::getArray($object::getClassName())); if ($object->validate()) { $object->save(); if ($this->continueEdit()) { $this->redirect("workplancontenttopics.php?action=edit&id=" . $object->getId()); } else { $this->redirect("workplancontentloads.php?action=edit&id=" . $object->load_id); } return true; } $this->setData("object", $object); $this->renderView("_corriculum/_workplan/contentTopic/edit.tpl"); }