Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
schemata
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
schemata
Merge requests
!13
Issue
#3084914
by drugan, mglaman, msantos202, manu manu: Support non-entity bundle types
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3084914
by drugan, mglaman, msantos202, manu manu: Support non-entity bundle types
issue/schemata-3084914:3084914-support-non-entity-bundle
into
8.x-1.x
Overview
0
Commits
3
Pipelines
4
Changes
1
Merged
Jakob P
requested to merge
issue/schemata-3084914:3084914-support-non-entity-bundle
into
8.x-1.x
11 months ago
Overview
0
Commits
3
Pipelines
4
Changes
1
Expand
Closes
#3084914
0
0
Merge request reports
Compare
8.x-1.x
version 3
af62c220
10 months ago
version 2
c912f57b
11 months ago
version 1
29b335c9
11 months ago
8.x-1.x (base)
and
latest version
latest version
af62c220
3 commits,
10 months ago
version 3
af62c220
3 commits,
10 months ago
version 2
c912f57b
2 commits,
11 months ago
version 1
29b335c9
1 commit,
11 months ago
1 file
+
4
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Routing/Routes.php
+
4
−
8
Options
@@ -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