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