Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsonapi_resources
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_resources
Commits
b8fdd6ac
Commit
b8fdd6ac
authored
1 year ago
by
Matt Glaman
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3200821
by mglaman, Pooja Ganjage: Document ResourceBase::getRouteResourceTypes()
parent
c0abb9a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Document getRouteResourceTypes
Pipeline
#136343
passed with warnings
1 year ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Resource/ResourceBase.php
+12
-1
12 additions, 1 deletion
src/Resource/ResourceBase.php
with
12 additions
and
1 deletion
src/Resource/ResourceBase.php
+
12
−
1
View file @
b8fdd6ac
...
...
@@ -111,7 +111,18 @@ abstract class ResourceBase {
}
/**
* {@inheritdoc}
* Gets the resource types for a route.
*
* Resource types are defined on routes in the `_jsonapi_resource_types`
* route's defaults.
*
* @param \Symfony\Component\Routing\Route $route
* The route.
* @param string $route_name
* The route name.
*
* @return array
* The resource types for the route.
*/
public
function
getRouteResourceTypes
(
Route
$route
,
string
$route_name
):
array
{
return
array_map
(
function
(
$resource_type_name
)
use
(
$route_name
)
{
...
...
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