@@ -71,13 +71,15 @@ |
||
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | 73 | Event::listen('pages.menuitem.getTypeInfo', function($type) { |
| 74 | - if ($type == 'location-town' || $type == 'all-location-towns') |
|
| 75 | - return Town::getMenuTypeInfo($type); |
|
| 74 | + if ($type == 'location-town' || $type == 'all-location-towns') { |
|
| 75 | + return Town::getMenuTypeInfo($type); |
|
| 76 | + } |
|
| 76 | 77 | }); |
| 77 | 78 | |
| 78 | 79 | Event::listen('pages.menuitem.resolveItem', function($type, $item, $url, $theme) { |
| 79 | - if ($type == 'location-town' || $type == 'all-location-towns') |
|
| 80 | - return Town::resolveMenuItem($item, $url, $theme); |
|
| 80 | + if ($type == 'location-town' || $type == 'all-location-towns') { |
|
| 81 | + return Town::resolveMenuItem($item, $url, $theme); |
|
| 82 | + } |
|
| 81 | 83 | }); |
| 82 | 84 | } |
| 83 | 85 | } |
@@ -119,8 +119,7 @@ |
||
| 119 | 119 | $result['url'] = URL::to('/kontakty/' . $stateCode . '/' . $town->slug); |
| 120 | 120 | $result['isActive'] = false; |
| 121 | 121 | $result['mtime'] = $town->updated_at; |
| 122 | - } |
|
| 123 | - elseif ($item->type == 'all-location-towns') { |
|
| 122 | + } elseif ($item->type == 'all-location-towns') { |
|
| 124 | 123 | $result = [ |
| 125 | 124 | 'items' => [] |
| 126 | 125 | ]; |