Skip to content
Snippets Groups Projects

Check to see if the menu tree contains any items in the array.

Open geinosky requested to merge issue/contextual_menu_block-3500585:1.3.x into 1.3.x
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
149 151 ['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'],
150 152 ];
151 153 $tree = $this->menuTree->transform($tree, $manipulators);
154
152 155 if (empty($tree)) {
153 156 return $build;
154 157 }
158
155 159 $build = $this->menuTree->build($tree);
156 array_walk($build['#items'], [static::class, 'removeNoLinkItem']);
157 array_walk($build['#items'], [static::class, 'unlinkActiveItem'], $active_link);
160
161 if (array_key_exists('items', $build)) {
  • geinosky added 1 commit

    added 1 commit

    • 79e49055 - Check to see if the array exists. The array key could provide a null value,...

    Compare with previous version

  • Please register or sign in to reply
    Loading