protected function HttpConfigRequestHtmlRouteProvider::getExecuteRoute in HTTP Client Manager 8
Same name and namespace in other branches
- 8.2 src/HttpConfigRequestHtmlRouteProvider.php \Drupal\http_client_manager\HttpConfigRequestHtmlRouteProvider::getExecuteRoute()
Gets the execute 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 HttpConfigRequestHtmlRouteProvider::getExecuteRoute()
- HttpConfigRequestHtmlRouteProvider::getRoutes in src/
HttpConfigRequestHtmlRouteProvider.php - Provides routes for entities.
File
- src/
HttpConfigRequestHtmlRouteProvider.php, line 71
Class
- HttpConfigRequestHtmlRouteProvider
- Provides routes for Http Config Request entities.
Namespace
Drupal\http_client_managerCode
protected function getExecuteRoute(EntityTypeInterface $entity_type) {
if ($entity_type
->hasLinkTemplate('execute') && $entity_type
->hasHandlerClass('execution_handler')) {
$route = new Route($entity_type
->getLinkTemplate('execute'));
$route
->setDefaults([
'_controller' => $entity_type
->getHandlerClass('execution_handler') . '::execute',
'_title' => 'Http Config Request execution',
])
->setRequirement('_permission', $entity_type
->getAdminPermission())
->setOption('_admin_route', TRUE);
return $route;
}
}