| Conditions | 5 |
| Paths | 5 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function __invoke($menuItem) |
||
| 35 | { |
||
| 36 | if ($menuItem['href']) { |
||
| 37 | return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/'.$menuItem['href']; |
||
| 38 | } elseif ($menuItem['page_slug']) { |
||
| 39 | return $this->url->__invoke('page', ['url_slug' => $menuItem['page_slug']]); |
||
| 40 | } elseif ($menuItem['category_slug']) { |
||
| 41 | return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]); |
||
| 42 | } else { |
||
| 43 | return '#'; |
||
| 44 | } |
||
| 45 | } |
||
| 46 | } |
||
| 47 |