public function DeleteMultipleRouteProvider::getRoutes in Entity API 8.0
Same name and namespace in other branches
- 8 src/Routing/DeleteMultipleRouteProvider.php \Drupal\entity\Routing\DeleteMultipleRouteProvider::getRoutes()
Provides routes for entities.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type
Return value
\Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[] Returns a route collection or an array of routes keyed by name, like route_callbacks inside 'routing.yml' files.
Overrides EntityRouteProviderInterface::getRoutes
File
- src/
Routing/ DeleteMultipleRouteProvider.php, line 23 - Contains \Drupal\entity\Routing\DeleteMultipleRouteProvider.
Class
- DeleteMultipleRouteProvider
- Provides the HTML route for deleting multiple entities.
Namespace
Drupal\entity\RoutingCode
public function getRoutes(EntityTypeInterface $entity_type) {
$routes = new RouteCollection();
if ($route = $this
->deleteMultipleFormRoute($entity_type)) {
$routes
->add('entity.' . $entity_type
->id() . '.delete_multiple_form', $route);
}
return $routes;
}