You are here

public function ToolbarMenuElement::loadMenu in Toolbar Menu 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ToolbarMenuElement.php \Drupal\toolbar_menu\Entity\ToolbarMenuElement::loadMenu()

Get the full loaded menu entity.

Return value

\Drupal\system\Entity\Menu|null|static Loaded menu.

File

src/Entity/ToolbarMenuElement.php, line 70

Class

ToolbarMenuElement
Defines the Toolbar element entity.

Namespace

Drupal\toolbar_menu\Entity

Code

public function loadMenu() {
  if ($this
    ->menu()) {
    return Menu::Load($this
      ->menu());
  }
  return NULL;
}