public function handleForm() { $data; if ($this->setup["method"] == "get") { $data = Yii::app()->controller->input_get($this->getFormName()); } else { // post $data = Yii::app()->controller->input_post($this->getFormName()); } if ($data === false) { return false; } $this->setAttributes($data); ModelFile::findFromInput($this->getFormName(), $this); $result = $this->validate(); if (!$result) { $this->onFormValidatedFail(); return false; } $result = $this->onFormValidatedSuccess(); if (!$result) { return false; } $this->onFormDone(); return true; }