You are here

public function ToolbarMenuManager::getPermissionList in Toolbar Menu 8

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

Get the permission list.

Return value

array The permission list.

File

src/ToolbarMenuManager.php, line 87

Class

ToolbarMenuManager
Implement a setting form for toolbar_menu module.

Namespace

Drupal\toolbar_menu

Code

public function getPermissionList() {
  $permissions = [];
  foreach ($this->toolbarMenuElements as $element) {
    $permissions[$this
      ->getPermissionName($element)] = [
      'title' => $this
        ->t('View <em>@label</em> element in the toolbar', [
        '@label' => $element
          ->label(),
      ]),
    ];
  }
  return $permissions;
}