Example #1
0
 /**
  * @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'));
 }
Example #2
0
 /**
  * @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'));
 }
Example #3
0
 /**
  * @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);
 }