protected function GroupRoleRouteProvider::getCollectionRoute in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Routing/GroupRoleRouteProvider.php \Drupal\group\Entity\Routing\GroupRoleRouteProvider::getCollectionRoute()
Gets the collection route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides DefaultHtmlRouteProvider::getCollectionRoute
File
- src/
Entity/ Routing/ GroupRoleRouteProvider.php, line 50
Class
- GroupRoleRouteProvider
- Provides routes for group roles.
Namespace
Drupal\group\Entity\RoutingCode
protected function getCollectionRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getCollectionRoute($entity_type)) {
// @todo Remove title part when https://www.drupal.org/node/2767025 lands.
$route
->setDefault('_title', 'Group roles');
$route
->setDefault('_title_arguments', []);
$route
->setOption('parameters', [
'group_type' => [
'type' => 'entity:group_type',
],
]);
return $route;
}
}