public function actionIndex($type)
 {
     $searchModel = new ArticleSearch();
     $searchModel->type = $type;
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 public function actionIndex($type)
 {
     $searchModel = new ArticleSearch();
     $searchModel->type = $type;
     $contentDataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $contentDataProvider->query->andWhere(['isPublished' => true]);
     return $this->render('index', ['searchModel' => $searchModel, 'contentDataProvider' => $contentDataProvider]);
 }