/** * This parameter description * @return string */ public function getDescription() { $param = WaterRequestParameters::model()->findByPk($this->parameter); if ($param) { return $param->description; } return ''; }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param string $id the identifier of the model to be loaded */ public function loadModel($id) { $model = WaterRequestParameters::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }