/** * @param $tags * @return string */ public function actionTags($tags) { $tags = Tag::string2Array($tags); $searchModel = new QuestionSearch(); $dataProvider = $searchModel->search(['tags' => $tags]); $models = $dataProvider->getModels(); return $this->render('tags', compact('searchModel', 'models', 'dataProvider', 'tags')); }
/** * @param $tags * @return string */ public function run($tags) { $tags = Tag::string2Array($tags); /** @var QuestionSearch $searchModel */ $searchModel = $this->getModel(); $dataProvider = $searchModel->search(['tags' => $tags]); $models = $dataProvider->getModels(); return $this->render(compact('searchModel', 'models', 'dataProvider', 'tags')); }
/** * @return array a list of links that point to the post list filtered by every tag of this post */ public function getTagsList() { return Tag::string2Array($this->tags); }