function menu_ui_get_menu_link_defaults
Same name and namespace in other branches
- 11.x core/modules/menu_ui/menu_ui.module \menu_ui_get_menu_link_defaults()
- 10 core/modules/menu_ui/menu_ui.module \menu_ui_get_menu_link_defaults()
- 9 core/modules/menu_ui/menu_ui.module \menu_ui_get_menu_link_defaults()
- 8.9.x core/modules/menu_ui/menu_ui.module \menu_ui_get_menu_link_defaults()
Returns the definition for a menu link for the given node.
Parameters
\Drupal\node\NodeInterface $node: The node entity.
Return value
array An array that contains default values for the menu link form.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal\menu_ui\MenuUiUtility::getMenuLinkDefaults() instead.
See also
https://www.drupal.org/node/3566774
File
-
core/
modules/ menu_ui/ menu_ui.module, line 45
Code
function menu_ui_get_menu_link_defaults(NodeInterface $node) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use MenuUiUtility::getMenuLinkDefaults() instead. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
return \Drupal::service(MenuUiUtility::class)->getMenuLinkDefaults($node);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.