You are here

public function LevelSetting::alterTree in Menu Bean 7

Alters the menu tree

Parameters

$tree:

\Bean $bean:

array:

Overrides SettingInterface::alterTree

File

lib/Drupal/menu_bean/Setting/LevelSetting.php, line 48
Level Plugin class

Class

LevelSetting

Namespace

Drupal\menu_bean\Setting

Code

public function alterTree(array &$tree, \Bean $bean) {

  // Prune the tree along the active trail to the specified level.
  if ($bean->level > 1) {
    $this
      ->menu_bean_tree_prune_tree($tree, $bean->level);
  }
}