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