/** * Manages all models. */ public function actionAdmin() { $model = new TipoEmpresa('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['TipoEmpresa'])) { $model->attributes = $_GET['TipoEmpresa']; } $this->render('admin', array('model' => $model)); }
public function actionparametrizarCampos() { $tipoCarrera = new TipoCarrera('BusquedaTiposCarreras'); $Carrera = new Carrera('BusquedaCarreras'); $TipoEmpresa = new TipoEmpresa('BusquedaTipoEmpresa'); $tipoCarrera->unsetAttributes(); $Carrera->unsetAttributes(); $TipoEmpresa->unsetAttributes(); if (isset($_GET['TipoCarrera'])) { $tipoCarrera->attributes = $_GET['TipoCarrera']; } if (isset($_GET['Carrera'])) { $Carrera->attributes = $_GET['Carrera']; } if (isset($_GET['TipoEmpresa'])) { $TipoEmpresa->attributes = $_GET['TipoEmpresa']; } $this->render('parametrizarCampos', array('model' => $this->loadModel(Yii::app()->user->getId()), 'tipoCarrera' => $tipoCarrera, 'Carrera' => $Carrera, 'TipoEmpresa' => $TipoEmpresa)); }