public function loadModel() { if ($this->_model === null) { if (isset($_GET['id'])) { $this->_model = Medicina::model()->findbyPk($_GET['id']); } if ($this->_model === null) { throw new CHttpException(404, Yii::t('app', 'The requested page does not exist.')); } } return $this->_model; }
public static function GET_LISTA_NOMBRE() { return CHtml::listData(Medicina::model()->findAll(), 'id', 'nombre'); }