You are here

protected function TeamRouteProvider::getAddTeamMembersRoute in Apigee Edge 8

Gets the add team members route.

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 TeamRouteProvider::getAddTeamMembersRoute()
TeamRouteProvider::getRoutes in modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php
Provides routes for entities.

File

modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php, line 129

Class

TeamRouteProvider
Team specific dynamic entity route provider.

Namespace

Drupal\apigee_edge_teams\Entity

Code

protected function getAddTeamMembersRoute(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->hasLinkTemplate('add-members')) {
    $route = new Route($entity_type
      ->getLinkTemplate('add-members'));
    $route
      ->setDefault('_form', AddTeamMembersForm::class);
    $route
      ->setDefault('_title', 'Invite members');
    $route
      ->setDefault('entity_type_id', $entity_type
      ->id());
    $this
      ->ensureTeamParameter($route);
    $route
      ->setRequirement('_apigee_edge_teams_manage_team_access', 'TRUE');
    return $route;
  }
  return NULL;
}