diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
index 4e7f32d..8077a69 100644
--- a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php
@@ -251,7 +251,7 @@ public function testDisplayAreas() {
// Assert that the expected text is found in each area category.
foreach ($areas as $type => $class) {
$element = $this->xpath('//div[contains(@class, :class)]/div', array(':class' => $class));
- $this->assertEqual((string) $element[0], "The selected display type does not utilize $type plugins");
+ $this->assertEqual((string) $element[0], t('The selected display type does not utilize @type plugins', array('@type' => $type)));
}
}
diff --git a/core/modules/views/views_ui/templates/views-ui-container.html.twig b/core/modules/views/views_ui/templates/views-ui-container.html.twig
new file mode 100644
index 0000000..98bc5fb
--- /dev/null
+++ b/core/modules/views/views_ui/templates/views-ui-container.html.twig
@@ -0,0 +1,16 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a generic container/wrapper.
+ *
+ * Available variables:
+ * - attributes: An array of HTML attributes to apply to the container element.
+ * - children: An array of renderable elements such as dropbuttons and tabs.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_views_ui_container()
+ *
+ * @ingroup themeable
+ */
+#}
+
{{ children }}
diff --git a/core/modules/views/views_ui/views_ui.module b/core/modules/views/views_ui/views_ui.module
index a17e215..f473973 100644
--- a/core/modules/views/views_ui/views_ui.module
+++ b/core/modules/views/views_ui/views_ui.module
@@ -157,6 +157,7 @@ function views_ui_theme() {
// is not desired.
'views_ui_container' => array(
'render element' => 'element',
+ 'template' => 'views-ui-container',
'file' => 'views_ui.theme.inc',
),
);
diff --git a/core/modules/views/views_ui/views_ui.theme.inc b/core/modules/views/views_ui/views_ui.theme.inc
index 841f15c..6481d5b 100644
--- a/core/modules/views/views_ui/views_ui.theme.inc
+++ b/core/modules/views/views_ui/views_ui.theme.inc
@@ -8,11 +8,19 @@
use Drupal\Core\Template\Attribute;
/**
- * Generic container function.
+ * Prepares variables for Views UI container templates.
+ *
+ * Default template: views-ui-container.html.twig.
+ *
+ * @param array $variables
+ * An associative array containing:
+ * - element: An associative array containing the properties of the element.
+ * Properties used: #attributes, #children.
*/
-function theme_views_ui_container($variables) {
- $element = $variables['element'];
- return '
' . $element['#children'] . '
';
+function template_preprocess_views_ui_container(&$variables) {
+ $variables['attributes'] = new Attribute($variables['element']['#attributes']);
+ $variables['children'] = $variables['element']['#children'];
+ dsm($variables);
}
function template_preprocess_views_ui_display_tab_setting(&$variables) {