Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsonapi_aliases
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
jsonapi_aliases
Commits
7203eba4
Commit
7203eba4
authored
9 months ago
by
Alexandre Israël
Browse files
Options
Downloads
Patches
Plain Diff
git commit -m 'Issue
#3437655
by allan.ordogh: Add langcode paramater'
parent
49551d93
Branches
2.0.x
Tags
2.0.0-alpha7
1 merge request
!6
git commit -m 'Issue #3437655 by allan.ordogh: Add langcode paramater'
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/StackMiddleware/PathAndFormatSetter.php
+4
-4
4 additions, 4 deletions
src/StackMiddleware/PathAndFormatSetter.php
with
4 additions
and
4 deletions
src/StackMiddleware/PathAndFormatSetter.php
+
4
−
4
View file @
7203eba4
...
...
@@ -147,7 +147,7 @@ class PathAndFormatSetter implements HttpKernelInterface {
// Lookup bundle & uuid for node id in our custom key-value store.
if
(
$info
=
$this
->
store
->
get
(
$path
))
{
// Build the default JSON-API path.
$path
=
$this
->
buildJsonApiPath
(
$info
);
$path
=
$this
->
buildJsonApiPath
(
$info
,
$langcode
);
// Replace immutable request with modified clone.
if
(
!
empty
(
$langcode
))
{
...
...
@@ -242,11 +242,11 @@ class PathAndFormatSetter implements HttpKernelInterface {
* @return string
* The
*/
protected
function
buildJsonApiPath
(
$info
)
{
protected
function
buildJsonApiPath
(
$info
,
$langcode
)
{
if
(
isset
(
$info
[
'bundle'
])
&&
$info
[
'bundle'
]
!==
null
)
{
return
'/'
.
$this
->
jsonapiPrefix
.
'/'
.
$info
[
'type'
]
.
'/'
.
$info
[
'bundle'
]
.
'/'
.
$info
[
'uuid'
];
return
'/'
.
$langcode
.
'/'
.
$this
->
jsonapiPrefix
.
'/'
.
$info
[
'type'
]
.
'/'
.
$info
[
'bundle'
]
.
'/'
.
$info
[
'uuid'
];
}
else
{
return
'/'
.
$this
->
jsonapiPrefix
.
'/'
.
$info
[
'type'
]
.
'/'
.
$info
[
'uuid'
];
return
'/'
.
$langcode
.
'/'
.
$this
->
jsonapiPrefix
.
'/'
.
$info
[
'type'
]
.
'/'
.
$info
[
'uuid'
];
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment