You are here

protected function TeamAppRouteProvider::getDeleteApiKeyRoute in Apigee Edge 8

Gets the delete-api-key-form route for a team app.

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

File

modules/apigee_edge_teams/src/Entity/TeamAppRouteProvider.php, line 191

Class

TeamAppRouteProvider
Default entity routes for team apps.

Namespace

Drupal\apigee_edge_teams\Entity

Code

protected function getDeleteApiKeyRoute(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->hasLinkTemplate('delete-api-key-form')) {
    $route = new Route($entity_type
      ->getLinkTemplate('delete-api-key-form'));
    $route
      ->setDefault('_form', TeamAppApiKeyDeleteForm::class);
    $route
      ->setDefault('entity_type_id', $entity_type
      ->id());
    $this
      ->ensureTeamParameter($route);
    $route
      ->setRequirement('_app_access_check_by_app_name', 'delete_api_key');
    return $route;
  }
}