Skip to content
Snippets Groups Projects
Commit b0a3759a authored by Tim Diels's avatar Tim Diels
Browse files

Merge remote-tracking branch 'origin/2.0.x' into 3393163-provide-a-correct

parents efd7fa04 1afb90ba
No related branches found
No related tags found
1 merge request!8Issue #3393163 by p-neyens: provide config schema
......@@ -5,4 +5,4 @@ remove_empty_divs: false
enable_drag_handle_icon: false
enable_admin_css: false
contextual_links_only_lb: false
contextual_links_roles: false
contextual_links_roles: { }
......@@ -101,7 +101,7 @@ class LayoutBuilderExtrasSettingsForm extends ConfigFormBase {
'#type' => 'checkboxes',
'#options' => $roleOptions,
'#title' => $this->t('For which roles should the contextual links still be visible?'),
'#default_value' => $config->get('contextual_links_roles') ?? FALSE,
'#default_value' => $config->get('contextual_links_roles') ?? [],
];
return $form;
......@@ -121,7 +121,7 @@ class LayoutBuilderExtrasSettingsForm extends ConfigFormBase {
$config->set('enable_drag_handle_icon', $form_state->getValue('enable_drag_handle_icon', FALSE));
$config->set('enable_admin_css', $form_state->getValue('enable_admin_css', FALSE));
$config->set('contextual_links_only_lb', $form_state->getValue('contextual_links_only_lb', FALSE));
$config->set('contextual_links_roles', $form_state->getValue('contextual_links_roles', FALSE));
$config->set('contextual_links_roles', $form_state->getValue('contextual_links_roles', []));
$config->save();
}
......
......@@ -77,7 +77,7 @@ class ContextualLinkManager extends \Drupal\Core\Menu\ContextualLinkManager {
}
}
$ids = version_compare(\Drupal::VERSION, '9.3', '>=') ? $this->requestStack->getMainRequest()->request->get('ids') : $this->requestStack->getMasterRequest()->request->get('ids');
$ids = version_compare(\Drupal::VERSION, '9.3', '>=') ? $this->requestStack->getMainRequest()->request->all()['ids'] ?? NULL : $this->requestStack->getMasterRequest()->request->get('ids');
if (!empty($ids)) {
foreach ($ids as $id) {
if (strpos($id, 'layout_builder_block:section_storage_type=') !== FALSE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment