protected function DefaultHtmlRouteProvider::getDeleteMultipleFormRoute in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider::getDeleteMultipleFormRoute()
Returns the delete multiple form route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
2 calls to DefaultHtmlRouteProvider::getDeleteMultipleFormRoute()
- AdminHtmlRouteProvider::getDeleteMultipleFormRoute in core/
lib/ Drupal/ Core/ Entity/ Routing/ AdminHtmlRouteProvider.php - Returns the delete multiple form route.
- DefaultHtmlRouteProvider::getRoutes in core/
lib/ Drupal/ Core/ Entity/ Routing/ DefaultHtmlRouteProvider.php - Provides routes for entities.
1 method overrides DefaultHtmlRouteProvider::getDeleteMultipleFormRoute()
- AdminHtmlRouteProvider::getDeleteMultipleFormRoute in core/
lib/ Drupal/ Core/ Entity/ Routing/ AdminHtmlRouteProvider.php - Returns the delete multiple form route.
File
- core/
lib/ Drupal/ Core/ Entity/ Routing/ DefaultHtmlRouteProvider.php, line 367
Class
- DefaultHtmlRouteProvider
- Provides HTML routes for entities.
Namespace
Drupal\Core\Entity\RoutingCode
protected function getDeleteMultipleFormRoute(EntityTypeInterface $entity_type) {
if ($entity_type
->hasLinkTemplate('delete-multiple-form') && $entity_type
->hasHandlerClass('form', 'delete-multiple-confirm')) {
$route = new Route($entity_type
->getLinkTemplate('delete-multiple-form'));
$route
->setDefault('_form', $entity_type
->getFormClass('delete-multiple-confirm'));
$route
->setDefault('entity_type_id', $entity_type
->id());
$route
->setRequirement('_entity_delete_multiple_access', $entity_type
->id());
return $route;
}
}