function handle_submitForm_load($formData = array(), $element = '') { $load = new CWorkPlanContentSectionLoad(); $load->setAttributes($formData); if ($load->validate()) { $load->save(); self::getStatefullFormBean()->getElement($element)->setShow(true); } else { self::getStatefullFormBean()->getElement($element)->setValidationErrors($load->getValidationErrors()); } }
public function actionSave() { $object = new CWorkPlanContentSectionLoad(); $object->setAttributes(CRequest::getArray($object::getClassName())); if ($object->validate()) { $object->save(); if ($this->continueEdit()) { $this->redirect("workplancontentloads.php?action=edit&id=" . $object->getId()); } else { $this->redirect("workplancontentloads.php?action=index§ion_id=" . $object->section_id); } return true; } $this->setData("object", $object); $this->renderView("_corriculum/_workplan/contentLoads/edit.tpl"); }