public function OgEventSubscriber::provideOgAdminRoutes in Organic groups 8
Provide OG admin routes.
Parameters
\Drupal\og\Event\OgAdminRoutesEventInterface $event: The OG admin routes event object.
File
- src/
EventSubscriber/ OgEventSubscriber.php, line 366
Class
- OgEventSubscriber
- Event subscribers for Organic Groups.
Namespace
Drupal\og\EventSubscriberCode
public function provideOgAdminRoutes(OgAdminRoutesEventInterface $event) {
$routes_info = $event
->getRoutesInfo();
$routes_info['members'] = [
'controller' => '\\Drupal\\og\\Controller\\OgAdminMembersController::membersList',
'title' => 'Members',
'description' => 'Manage members',
'path' => 'members',
'requirements' => [
'_og_user_access_group' => OgAccess::ADMINISTER_GROUP_PERMISSION,
// Views module must be enabled.
'_module_dependencies' => 'views',
],
];
$event
->setRoutesInfo($routes_info);
}