You are here

public function ToolbarMenuManager::__construct in Toolbar Menu 8.2

Same name and namespace in other branches
  1. 8 src/ToolbarMenuManager.php \Drupal\toolbar_menu\ToolbarMenuManager::__construct()

Construct a new ToolbarMenu.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager.

\Drupal\Core\Session\AccountProxyInterface $account: The account service.

File

src/ToolbarMenuManager.php, line 39

Class

ToolbarMenuManager
Implement a setting form for toolbar_menu module.

Namespace

Drupal\toolbar_menu

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $account) {
  $this->account = $account
    ->getAccount();
  $this->toolbarMenuElements = $entity_type_manager
    ->getStorage('toolbar_menu_element')
    ->loadMultiple();
}