protected function GroupRoleRouteProvider::getEditFormRoute in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Routing/GroupRoleRouteProvider.php \Drupal\group\Entity\Routing\GroupRoleRouteProvider::getEditFormRoute()
Gets the edit-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::getEditFormRoute
File
- src/
Entity/ Routing/ GroupRoleRouteProvider.php, line 26
Class
- GroupRoleRouteProvider
- Provides routes for group roles.
Namespace
Drupal\group\Entity\RoutingCode
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getEditFormRoute($entity_type)) {
// @todo Remove title part when https://www.drupal.org/node/2827739 lands.
$route
->setDefault('_title_callback', '\\Drupal\\group\\Entity\\Controller\\GroupRoleController::editTitle');
$route
->setOption('parameters', [
'group_type' => [
'type' => 'entity:group_type',
],
]);
return $route;
}
}