public function DefaultHtmlRouteProvider::getRoutes in Entity API 8
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 DefaultHtmlRouteProvider::getRoutes
1 call to DefaultHtmlRouteProvider::getRoutes()
- AdminHtmlRouteProvider::getRoutes in src/
Routing/ AdminHtmlRouteProvider.php - Provides routes for entities.
1 method overrides DefaultHtmlRouteProvider::getRoutes()
- AdminHtmlRouteProvider::getRoutes in src/
Routing/ AdminHtmlRouteProvider.php - Provides routes for entities.
File
- src/
Routing/ DefaultHtmlRouteProvider.php, line 18
Class
- DefaultHtmlRouteProvider
- Provides HTML routes for entities.
Namespace
Drupal\entity\RoutingCode
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
$entity_type_id = $entity_type
->id();
if ($duplicate_route = $this
->getDuplicateFormRoute($entity_type)) {
$collection
->add("entity.{$entity_type_id}.duplicate_form", $duplicate_route);
}
return $collection;
}