Ejemplo n.º 1
0
 /**
  * Просмотр списка постов по тегу
  * @param $id
  * @return string
  */
 public function actionView($id)
 {
     $tagModel = new Tags();
     $tag = $tagModel->getTag($id);
     $categoryModel = new Category();
     return $this->render('view', ['tag' => $tag, 'posts' => $tag->getTagPosts(), 'categories' => $categoryModel->getCategories()]);
 }
Ejemplo n.º 2
0
 /**
  * list of post group by tag
  * @param $id
  */
 public function actionTagsort($id)
 {
     $tagModel = new Tags();
     $tag = $tagModel->getTag($id);
     return $this->render('tagsort', ['tag' => $tag, 'posts' => $tag->getTagPosts()]);
 }