You are here

public function OgMenuEventSubscriber::provideDefaultOgPermissions in Organic Groups Menu (OG Menu) 8

Provides default OG permissions.

Parameters

\Drupal\og\Event\PermissionEventInterface $event: The OG permission event.

File

src/EventSubscriber/OgMenuEventSubscriber.php, line 30

Class

OgMenuEventSubscriber
Event subscribers for OG Menu.

Namespace

Drupal\og_menu\EventSubscriber

Code

public function provideDefaultOgPermissions(PermissionEventInterface $event) {

  // @todo Make granular per OG Menu instance.
  $event
    ->setPermissions([
    new GroupPermission([
      'name' => 'add new links to og menu instance entities',
      'title' => t('Add new links to OG Menu instance entities'),
      'default roles' => [
        OgRoleInterface::ADMINISTRATOR,
      ],
    ]),
  ]);
}