function menu_link_load

Loads a menu link entity.

This function should never be called from within node_load() or any other function used as a menu object load function since an infinite recursion may occur.

Parameters

int $mlid: The menu link ID.

bool $reset: (optional) Whether to reset the menu_link_load_multiple() cache.

Return value

\Drupal\menu_link\Plugin\Core\Entity\MenuLink|false A menu link entity, or FALSE if there is no entity with the given ID.

6 calls to menu_link_load()
LinksTest::assertMenuLinkParents in drupal/core/modules/system/lib/Drupal/system/Tests/Menu/LinksTest.php
Assert that at set of links is properly parented.
MenuNodeTest::testMenuNodeFormWidget in drupal/core/modules/menu/lib/Drupal/menu/Tests/MenuNodeTest.php
Test creating, editing, deleting menu links via node form widget.
menu_node_prepare in drupal/core/modules/menu/menu.module
Implements hook_node_prepare().
shortcut_set_customize_submit in drupal/core/modules/shortcut/shortcut.admin.inc
Submit handler for shortcut_set_customize().
system_get_module_admin_tasks in drupal/core/modules/system/system.module
Generate a list of tasks offered by a specified module.

... See full list

File

drupal/core/modules/menu_link/menu_link.module, line 37
Enables users to create menu links.

Code

function menu_link_load($mlid = NULL, $reset = FALSE) {
  return entity_load('menu_link', $mlid, $reset);
}