Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function posts(string $categorySlug) |
||
23 | { |
||
24 | $slugModel = new SlugModel($this->container); |
||
25 | $postModel = new PostModel($this->container); |
||
26 | $categoryModel = new CategoryModel($this->container); |
||
27 | |||
28 | $this->data['configs'] = $this->siteConfig->getSiteConfig(); |
||
29 | |||
30 | $categoryId = $slugModel->getIdFromSlug($categorySlug, "categories", "categories_slug", "idcategories"); |
||
31 | $this->data['navigation'] = $categoryModel->getMenu(); |
||
32 | $this->data['posts'] = $postModel->getPostsInCategory($categoryId); |
||
33 | |||
34 | $this->renderView('Category'); |
||
35 | |||
37 | } |