You are here

protected function GroupContentMenuRouteProvider::getCreatePermissions in Group Content Menu 8

Get create permissions.

Return value

array List of create permissions.

File

src/Routing/GroupContentMenuRouteProvider.php, line 211

Class

GroupContentMenuRouteProvider
Provides routes for group_content_menu content.

Namespace

Drupal\group_content_menu\Routing

Code

protected function getCreatePermissions() {
  $permissions = [];
  foreach (array_keys(GroupContentMenuType::loadMultiple()) as $entity_type_id) {
    $permissions[] = "create group_content_menu:{$entity_type_id} content";
  }
  return $permissions ?: [
    'access group content menu overview',
  ];
}