Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function posts(int $tagId, string $page = "page-1") |
||
32 | { |
||
33 | $postModel = new PostModel($this->container); |
||
34 | $tagModel = new TagModel($this->container); |
||
35 | |||
36 | $totalPosts = $postModel->totalNumberPostsByTag($tagId); |
||
37 | $pagination = $this->pagination->getPagination($page, $totalPosts); |
||
38 | |||
39 | $this->sendSessionVars(); |
||
40 | $this->data['posts'] = $postModel->getPostsWithTag($tagId, $pagination["offset"]); |
||
41 | $this->data['configs'] = $this->siteConfig->getSiteConfig(); |
||
42 | $this->data['navigation'] = $this->siteConfig->getMenu(); |
||
43 | $this->data['pagination'] = $pagination; |
||
44 | $this->data['tagId'] = $tagId; |
||
45 | $this->data['tag'] = $tagModel->getTagDetails($tagId); |
||
46 | $this->renderView('Tag'); |
||
47 | } |
||
48 | } |