protected function TeamRouteProvider::getEditTeamMemberRoute in Apigee Edge 8
Gets the edit team member 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::getEditTeamMemberRoute()
- 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 152
Class
- TeamRouteProvider
- Team specific dynamic entity route provider.
Namespace
Drupal\apigee_edge_teams\EntityCode
protected function getEditTeamMemberRoute(EntityTypeInterface $entity_type) {
// Because this path depends on the {developer} route parameter that
// can not be resolved in Team::urlRouteParameters() therefore this path
// can not be defined in the link templates defined on the Team entity.
$route = new Route('/teams/{team}/members/{developer}/edit');
$route
->setDefault('_form', EditTeamMemberForm::class);
$route
->setDefault('_title', 'Edit member');
$route
->setDefault('entity_type_id', $entity_type
->id());
$route
->setRequirement('_apigee_edge_teams_manage_team_access', 'TRUE');
// Make sure parameters gets up-casted.
// (This also ensures that we get an "Page not found" page if user with
// uid does not exist.)
$route
->setOption('parameters', [
'team' => [
'type' => 'entity:team',
'converter' => 'paramconverter.entity',
],
'developer' => [
'converter' => 'paramconverter.developer_with_user',
],
]);
return $route;
}