public MenuLinkTreeInterface::transform(array $tree, array $manipulators)
Applies menu link tree manipulators to transform the given tree.
Parameters
\Drupal\Core\Menu\MenuLinkTreeElement[] $tree: The menu tree to manipulate.
array $manipulators: The menu link tree manipulators to apply. Each is an array with keys:
- callable: a callable or a string that can be resolved to a callable by \Drupal\Core\Controller\ControllerResolverInterface::getControllerFromDefinition()
- args: optional array of arguments to pass to the callable after $tree.
Return value
\Drupal\Core\Menu\MenuLinkTreeElement[] The manipulated menu link tree.
File
- core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php, line 77
Class
- MenuLinkTreeInterface
- Defines an interface for loading, transforming and rendering menu link trees.
Namespace
Drupal\Core\Menu
Code
public function transform(array $tree, array $manipulators);
Please login to continue.