/** * Display types list */ public function actionIndex() { $model = new ShopProductType('search'); $this->pageName = Yii::t('ShopModule.admin', 'TYPE_PRODUCTS'); $this->breadcrumbs = array(Yii::t('ShopModule.default', 'MODULE_NAME') => array('/admin/shop'), $this->pageName); $this->topButtons = array(array('label' => Yii::t('ShopModule.admin', 'Создать тип'), 'url' => $this->createUrl('create'), 'htmlOptions' => array('class' => 'btn btn-success'))); if (!empty($_GET['ShopProductType'])) { $model->attributes = $_GET['ShopProductType']; } $dataProvider = $model->orderByName()->search(); $this->render('index', array('model' => $model, 'dataProvider' => $dataProvider)); }