| @@ 48-55 (lines=8) @@ | ||
| 45 | { |
|
| 46 | if ($this->hasChildren($item)) { |
|
| 47 | $this->addChildrenToMenu($item->title, $item->items, $menu); |
|
| 48 | } else { |
|
| 49 | $target = $item->uri ?: $item->url; |
|
| 50 | $menu->url( |
|
| 51 | $target, |
|
| 52 | $item->title, |
|
| 53 | ['target' => $item->target] |
|
| 54 | ); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| @@ 94-102 (lines=9) @@ | ||
| 91 | { |
|
| 92 | if ($this->hasChildren($item)) { |
|
| 93 | $this->addChildrenToMenu($item->title, $item->items, $menu, ['icon' => $item->icon, 'target' => $item->target]); |
|
| 94 | } else { |
|
| 95 | $target = $this->getTarget($item); |
|
| 96 | $menu->url( |
|
| 97 | $target, |
|
| 98 | $item->title, |
|
| 99 | ['target' => $item->target, |
|
| 100 | 'icon' => $item->icon] |
|
| 101 | ); |
|
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| @@ 130-133 (lines=4) @@ | ||
| 127 | { |
|
| 128 | if ($this->hasChildren($child)) { |
|
| 129 | $this->addChildrenToMenu($child->title, $child->items, $sub); |
|
| 130 | } else { |
|
| 131 | $target = $this->getTarget($child); |
|
| 132 | $sub->url($target, $child->title, 0, ['icon' => $child->icon, 'target' => $target]); |
|
| 133 | } |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|