protected function TeamInvitationRouteProvider::getDeleteFormRoute in Apigee Edge 8
Gets the delete-form route for team_invitation.
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
1 call to TeamInvitationRouteProvider::getDeleteFormRoute()
- TeamInvitationRouteProvider::getRoutes in modules/
apigee_edge_teams/ src/ Entity/ TeamInvitationRouteProvider.php - Provides routes for entities.
File
- modules/
apigee_edge_teams/ src/ Entity/ TeamInvitationRouteProvider.php, line 69
Class
- TeamInvitationRouteProvider
- Provides entity routes for team_invitation.
Namespace
Drupal\apigee_edge_teams\EntityCode
protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
if ($entity_type
->hasLinkTemplate('delete-form')) {
$entity_type_id = $entity_type
->id();
$route = new Route($entity_type
->getLinkTemplate('delete-form'));
$route
->setDefault('_entity_form', "{$entity_type_id}.delete");
$route
->setDefault('_title_callback', TeamInvitationTitleProvider::class . '::deleteTitle');
$route
->setDefault('entity_type_id', $entity_type_id);
$this
->ensureTeamParameter($route);
$route
->setRequirement('_entity_access', "{$entity_type_id}.delete");
return $route;
}
}