You are here

public function MenuLinkTreeHandler::processMenuLinkTree in Menu Item Extras 8

Process menu tree items. Add menu item content.

Parameters

array $items: Menu tree items.

File

src/MenuLinkTreeHandler.php, line 96

Class

MenuLinkTreeHandler
Class MenuLinkTreeHandler.

Namespace

Drupal\menu_item_extras

Code

public function processMenuLinkTree(array &$items) {
  foreach ($items as &$item) {
    if (isset($item['original_link'])) {
      $item['content'] = $this
        ->getMenuLinkItemContent($item['original_link']);
    }

    // Process subitems.
    if ($item['below']) {
      $this
        ->processMenuLinkTree($item['below']);
    }
  }
}