You are here

protected function TeamInvitationRouteProvider::getResentFormRoute in Apigee Edge 8

Gets the notify-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.

1 call to TeamInvitationRouteProvider::getResentFormRoute()
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 91

Class

TeamInvitationRouteProvider
Provides entity routes for team_invitation.

Namespace

Drupal\apigee_edge_teams\Entity

Code

protected function getResentFormRoute(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->hasLinkTemplate('resend-form')) {
    $entity_type_id = $entity_type
      ->id();
    $route = new Route($entity_type
      ->getLinkTemplate('resend-form'));
    $route
      ->setDefault('_entity_form', "{$entity_type_id}.resend");
    $route
      ->setDefault('_title_callback', TeamInvitationTitleProvider::class . '::resendTitle');
    $route
      ->setDefault('entity_type_id', $entity_type_id);
    $this
      ->ensureTeamParameter($route);
    $route
      ->setRequirement('_entity_access', "{$entity_type_id}.resend");
    return $route;
  }
}