protected function GroupRoleRouteProvider::getAddFormRoute in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Routing/GroupRoleRouteProvider.php \Drupal\group\Entity\Routing\GroupRoleRouteProvider::getAddFormRoute()
Gets the add-form 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::getAddFormRoute
File
- src/
Entity/ Routing/ GroupRoleRouteProvider.php, line 16
Class
- GroupRoleRouteProvider
- Provides routes for group roles.
Namespace
Drupal\group\Entity\RoutingCode
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getAddFormRoute($entity_type)) {
$route
->setOption('parameters', [
'group_type' => [
'type' => 'entity:group_type',
],
]);
return $route;
}
}