You are here

protected function ToolbarMenuManager::getPermissionName in Toolbar Menu 8

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

Get the formatted permission name.

Parameters

\Drupal\toolbar_menu\Entity\ToolbarMenuElement $element: The name of the menu.

Return value

string The name of the permission.

1 call to ToolbarMenuManager::getPermissionName()
ToolbarMenuManager::getToolbarMenuElements in src/ToolbarMenuManager.php
Get toolbar menu elements.

File

src/ToolbarMenuManager.php, line 106

Class

ToolbarMenuManager
Implement a setting form for toolbar_menu module.

Namespace

Drupal\toolbar_menu

Code

protected function getPermissionName(ToolbarMenuElement $element) {
  return 'view ' . $element
    ->id() . ' in toolbar';
}