public function actionAdmin() { $model = new Film_text('search'); $model->unsetAttributes(); if (isset($_GET['Film_text'])) { $model->setAttributes($_GET['Film_text']); } $this->render('admin', array('model' => $model)); }
<?php $this->breadcrumbs = array(Film_text::label(2), 'Index'); $this->menu = array(array('label' => 'Create' . ' ' . Film_text::label(), 'url' => array('create')), array('label' => 'Manage' . ' ' . Film_text::label(2), 'url' => array('admin'))); ?> <h1><?php echo GxHtml::encode(Film_text::label(2)); ?> </h1> <?php $this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
public function loadModel($id) { $model = Film_text::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, Yii::t('app', 'The requested page does not exist.')); } return $model; }