summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorAlex Pott2017-03-13 15:51:16 (GMT)
committerAlex Pott2017-03-13 15:51:16 (GMT)
commit6b62f6bc8e050ef0d83b8048fdc195be0f2feb9b (patch)
tree16f90bf952a576434e95952617051e2f736caf6e /core/lib/Drupal/Core/Render
parent2421ca249150ae6712b3452fcea99c6ebb07528a (diff)
Issue #2718655 by dawehner, Jo Fitzgerald, Wim Leers: #type actions with dropbutton loses bubbleable metadata
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/Element/Actions.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/Render/Element/Actions.php b/core/lib/Drupal/Core/Render/Element/Actions.php
index ad85401..2e75165 100644
--- a/core/lib/Drupal/Core/Render/Element/Actions.php
+++ b/core/lib/Drupal/Core/Render/Element/Actions.php
@@ -3,6 +3,7 @@
namespace Drupal\Core\Render\Element;
use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Render\BubbleableMetadata;
use Drupal\Core\Render\Element;
/**
@@ -103,6 +104,10 @@ class Actions extends Container {
$dropbuttons[$dropbutton]['#links'][$key] = [
'title' => $button,
];
+ // Merge metadata like drupalSettings.
+ BubbleableMetadata::createFromRenderArray($dropbuttons[$dropbutton])
+ ->merge(BubbleableMetadata::createFromRenderArray($element[$key]))
+ ->applyTo($dropbuttons[$dropbutton]);
}
}
// @todo For now, all dropbuttons appear first. Consider to invent a more