Ejemplo n.º 1
0
 /**
  * Display manufacturers list
  */
 public function actionIndex()
 {
     $model = new ShopManufacturer('search');
     if (!empty($_GET['ShopManufacturer'])) {
         $model->attributes = $_GET['ShopManufacturer'];
     }
     $this->pageName = Yii::t('ShopModule.admin', 'BRANDS');
     $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')));
     $dataProvider = $model->orderByName()->search();
     $this->render('index', array('model' => $model, 'dataProvider' => $dataProvider));
 }