/** * Manages all models. */ public function actionAdmin() { $model = new Vehiculo('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Vehiculo'])) { $model->attributes = $_GET['Vehiculo']; } $this->render('admin', array('model' => $model)); }
/** * Lists all models. */ public function actionIndex() { $model = new Vehiculo('search'); $modelDV = new DocumentoForm(); // Código para redireccionar a ver los *.pdf if (isset($_POST['DocumentoForm'])) { $modelDV->attributes = $_POST['DocumentoForm']; $this->actionViewPdf($modelDV->documento); } $model->unsetAttributes(); // clear any default values $modelDV->unsetAttributes(); // clear any default values if (isset($_GET['Vehiculo'])) { $model->attributes = $_GET['Vehiculo']; } $this->render('index', array('model' => $model, 'modelDV' => $modelDV)); }