Same name in other branches
- 8.x-1.x src/Routing/RouteSubscriber.php \Drupal\entity_clone\Routing\RouteSubscriber::alterRoutes()
Fichier
-
src/
Routing/ RouteSubscriber.php, line 37
Classe
- RouteSubscriber
- Subscriber for Entity Clone routes.
Namespace
Drupal\entity_clone\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
foreach ($this->entityTypeManager
->getDefinitions() as $entity_type_id => $entity_type) {
if ($route = $this->getEntityCloneRoute($entity_type)) {
$collection->add("entity.{$entity_type_id}.clone_form", $route);
}
}
}