public function MenuAdminPerMenuPermissions::permissions in Menu Admin per Menu 8
Returns an array of menu_admin_per_menu permissions.
Return value
array Array of permissions associated with menus.
1 string reference to 'MenuAdminPerMenuPermissions::permissions'
File
- src/
MenuAdminPerMenuPermissions.php, line 35
Class
- MenuAdminPerMenuPermissions
- Menu Admin Per Menu Permissions class.
Namespace
Drupal\menu_admin_per_menuCode
public function permissions() {
$permissions = [];
$menus = $this
->getExistingMenus();
foreach ($menus as $name => $title) {
$permission = 'administer ' . $name . ' menu items';
$permissions[$permission] = [
'title' => $this
->t('Administer <em>@menu</em> menu items', [
'@menu' => $title,
]),
];
}
return $permissions;
}