/** * Manages all models. */ public function actionAdmin() { $model = new Budget('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Budget'])) { $model->attributes = $_GET['Budget']; } $this->render('admin', array('model' => $model)); }
/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { $this->title = 'Rincian DIPA/POK'; $budgetModel = new Budget('searchBudget'); $budgetModel->unsetAttributes(); // clear any default values if (isset($_GET['Budget'])) { $model->attributes = $_GET['Budget']; } $this->render('view', array('model' => $this->loadModel($id), 'budgetModel' => $budgetModel, 'id' => $id)); }