/**
* {@inheritdoc}
*/
public function getParentSelectOptions($id = '', array
$menus = NULL, CacheableMetadata &
$cacheability = NULL
) { if (!
isset($menus)) { $menus =
$this->
getMenuOptions();
} $options =
[];
$depth_limit =
$this->
getParentDepthLimit($id);
foreach ($menus as $menu_name =>
$menu_title) { $options[$menu_name . ':'
] = '<' .
$menu_title . '>';
$parameters =
new MenuTreeParameters();
$parameters->
setMaxDepth($depth_limit);
$tree =
$this->menuLinkTree->
load($menu_name,
$parameters);
$manipulators =
[ ['callable' => 'menu.default_tree_manipulators:checkNodeAccess'
],
['callable' => 'menu.default_tree_manipulators:checkAccess'
],
['callable' => 'menu.default_tree_manipulators:generateIndexAndSort'
],
];