@@ -35,24 +35,20 @@ |
||
35 | 35 | { |
36 | 36 | if($menuItem['href']) { |
37 | 37 | return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/' . $menuItem['href']; |
38 | - } |
|
39 | - elseif($menuItem['article_slug']) { |
|
38 | + } elseif($menuItem['article_slug']) { |
|
40 | 39 | // @todo refactor - break categories into single category per article... |
41 | 40 | $category = $this->postService->getCategories($menuItem['article_id'])->current(); |
42 | 41 | |
43 | 42 | if($category){ |
44 | 43 | $params = ['segment_1' => $category->slug, 'segment_2' => $menuItem['article_slug']]; |
45 | - } |
|
46 | - else{ |
|
44 | + } else{ |
|
47 | 45 | $params = ['segment_1' => $menuItem['article_slug']]; |
48 | 46 | } |
49 | 47 | |
50 | 48 | return $this->url->__invoke('post', $params); |
51 | - } |
|
52 | - elseif($menuItem['category_slug']) { |
|
49 | + } elseif($menuItem['category_slug']) { |
|
53 | 50 | return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]); |
54 | - } |
|
55 | - else { |
|
51 | + } else { |
|
56 | 52 | return '#'; |
57 | 53 | } |
58 | 54 | } |