public function DepthSetting::alterTree in Menu Bean 7
Alters the menu tree
Parameters
array:
\Bean $bean:
Overrides SettingInterface::alterTree
File
- lib/
Drupal/ menu_bean/ Setting/ DepthSetting.php, line 45 - Level Plugin class
Class
Namespace
Drupal\menu_bean\SettingCode
public function alterTree(array &$tree, \Bean $bean) {
// Trim the branches that extend beyond the specified depth.
if ($bean->depth > 0) {
$this
->menu_tree_depth_trim($tree, $bean->depth);
}
}