Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0d2afd29
Unverified
Commit
0d2afd29
authored
Jan 13, 2019
by
alexpott
Browse files
Issue
#3016829
by tim.plunkett, x11: Follow-up for intersection of
#3014949
and
#2968139
parent
6cbe4eac
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/layout_builder/layout_builder.module
View file @
0d2afd29
...
...
@@ -211,11 +211,12 @@ function layout_builder_block_content_access(EntityInterface $entity, $operation
*/
function
layout_builder_plugin_filter_block__block_ui_alter
(
array
&
$definitions
,
array
$extra
)
{
foreach
(
$definitions
as
$id
=>
$definition
)
{
// Filter out any layout_builder definition with required contexts.
if
(
$definition
[
'provider'
]
===
'layout_builder'
&&
!
empty
(
$definition
[
'context'
]))
{
/** @var \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context */
foreach
(
$definition
[
'context'
]
as
$context
)
{
if
(
$context
->
isRequired
())
{
// Filter out any layout_builder-provided block that has required context
// definitions.
if
(
$definition
[
'provider'
]
===
'layout_builder'
&&
!
empty
(
$definition
[
'context_definitions'
]))
{
/** @var \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition */
foreach
(
$definition
[
'context_definitions'
]
as
$context_definition
)
{
if
(
$context_definition
->
isRequired
())
{
unset
(
$definitions
[
$id
]);
break
;
}
...
...
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