Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
subentity
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
subentity
Commits
dfd5a413
Commit
dfd5a413
authored
1 year ago
by
Antoine Forgue
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3443104
: Invalid name for theme suggestions
parent
b603ee17
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
subentity.module
+3
-5
3 additions, 5 deletions
subentity.module
with
3 additions
and
5 deletions
subentity.module
+
3
−
5
View file @
dfd5a413
...
...
@@ -63,19 +63,17 @@ function subentity_theme_suggestions_alter(array &$suggestions, array $variables
if
(
isset
(
$variables
[
'elements'
][
'#'
.
$hook
])
&&
$variables
[
'elements'
][
'#'
.
$hook
]
instanceof
SubEntityBase
)
{
$subentity
=
$variables
[
'elements'
][
'#'
.
$hook
];
$suggestions
[]
=
'subentity__'
.
$hook
;
if
(
!
empty
(
$variables
[
'elements'
][
'#view_mode'
]))
{
$view_mode
=
$variables
[
'elements'
][
'#view_mode'
];
$suggestions
[]
=
'subentity__'
.
$view_mode
;
$suggestions
[]
=
'subentity__'
.
$hook
.
'__'
.
$view_mode
;
$suggestions
[]
=
$hook
.
'__'
.
$view_mode
;
}
if
(
$subentity
->
bundle
()
!==
'subentity'
)
{
$bundle
=
$subentity
->
bundle
();
$suggestions
[]
=
'subentity__'
.
$hook
.
'__'
.
$bundle
;
$suggestions
[]
=
$hook
.
'__'
.
$bundle
;
if
(
!
empty
(
$view_mode
))
{
$suggestions
[]
=
'subentity__'
.
$hook
.
'__'
.
$bundle
.
'__'
.
$view_mode
;
$suggestions
[]
=
$hook
.
'__'
.
$bundle
.
'__'
.
$view_mode
;
}
}
}
...
...
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