Skip to content
Snippets Groups Projects

Issue #3084914 by drugan, mglaman, msantos202, manu manu: Support non-entity bundle types

Merged Jakob P requested to merge issue/schemata-3084914:3084914-support-non-entity-bundle into 8.x-1.x
+ 4
8
@@ -74,14 +74,10 @@ class Routes implements ContainerInjectionInterface {
// Add a route for all entity types.
$route_collection->add($this->createRouteName($entity_type_id), $this->createRoute($entity_type_id));
// If this entity type has a bundle entity type,
// then add a route for each bundle.
if ($entity_type->getBundleEntityType()) {
// Loop through all the bundles for the entity type.
$bundles_info = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id);
foreach (array_keys($bundles_info) as $bundle) {
$route_collection->add($this->createRouteName($entity_type_id, $bundle), $this->createRoute($entity_type_id, $bundle));
}
// Loop through all the bundles for the entity type.
$bundles_info = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id);
foreach (array_keys($bundles_info) as $bundle) {
$route_collection->add($this->createRouteName($entity_type_id, $bundle), $this->createRoute($entity_type_id, $bundle));
}
}
return $route_collection;
Loading