Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
context
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
context
Commits
812e2fa0
Commit
812e2fa0
authored
May 15, 2020
by
boshtian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep consistent variable naming inside of a file
parent
a4f5a824
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/Plugin/ContextReaction/Blocks.php
src/Plugin/ContextReaction/Blocks.php
+5
-5
No files found.
src/Plugin/ContextReaction/Blocks.php
View file @
812e2fa0
...
...
@@ -217,7 +217,7 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
// Create the render array for the block as a whole.
// @see template_preprocess_block().
$block
B
uild
=
[
$block
_b
uild
=
[
'#theme'
=>
'block'
,
'#configuration'
=>
$configuration
,
'#plugin_id'
=>
$block
->
getPluginId
(),
...
...
@@ -246,7 +246,7 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
$block_build
[
'#attributes'
]
=
array_merge_recursive
(
$existing_attributes
,
$new_attributes
);
// Add additional contextual link, for editing block configuration.
$block
B
uild
[
'#contextual_links'
][
'context_block'
]
=
[
$block
_b
uild
[
'#contextual_links'
][
'context_block'
]
=
[
'route_parameters'
=>
[
'context'
=>
$configuration
[
'context_id'
],
'reaction_id'
=>
'blocks'
,
...
...
@@ -255,15 +255,15 @@ class Blocks extends ContextReactionPluginBase implements ContainerFactoryPlugin
];
if
(
array_key_exists
(
'weight'
,
$configuration
))
{
$block
B
uild
[
'#weight'
]
=
$configuration
[
'weight'
];
$block
_b
uild
[
'#weight'
]
=
$configuration
[
'weight'
];
}
// Invoke block_view_alter().
// If an alter hook wants to modify the block contents, it can append
// another #pre_render hook.
\
Drupal
::
moduleHandler
()
->
alter
([
'block_view'
,
'block_view_'
.
$block
->
getBaseId
()],
$block
B
uild
,
$block
);
\
Drupal
::
moduleHandler
()
->
alter
([
'block_view'
,
'block_view_'
.
$block
->
getBaseId
()],
$block
_b
uild
,
$block
);
$build
[
$region
][
$block_placement_key
]
=
$block
B
uild
;
$build
[
$region
][
$block_placement_key
]
=
$block
_b
uild
;
// After merging with blocks from Block layout, we want to sort all of
// them again.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment