예제 #1
0
 public static function getProductGroupList($idGroup = null)
 {
     $query = \biz\master\models\searchs\ProductGroup::find();
     if ($idGroup !== null) {
         $query->where(['id_group' => $idGroup]);
     }
     return ArrayHelper::map($query->asArray()->all(), 'id_group', 'nm_group');
 }
 /**
  * Lists all ProductGroup models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ProductGroupSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams());
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }