/** * Manages all models. */ public function actionAdmin() { $model = new EmpleoCargo('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['EmpleoCargo'])) { $model->attributes = $_GET['EmpleoCargo']; } if (count($model->findAll()) > 0) { $this->render('admin', array('model' => $model)); } else { $this->render('empty', array('model' => $model)); } }