/** * Get list of active meta tags * * @return MetaTag[] */ protected function getTagList() { return MetaTag::find()->where('is_active = :is_active', [':is_active' => 1])->orderBy(['position' => SORT_DESC])->all(); }
/** * Lists all MetaTag models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => MetaTag::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }