diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php index 4e74450aeeeafa795107183ff9bc7729c06f9672..11bc5e3dd465160ff5b2dd06ef2cc60fba28ad36 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php @@ -7,6 +7,8 @@ namespace Drupal\views_ui\Tests; +use Drupal\Component\Utility\String; + /** * Tests the handling of displays in the UI, adding removing etc. */ @@ -251,7 +253,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], String::format('The selected display type does not utilize @type plugins', array('@type' => $type))); } } diff --git a/core/modules/views_ui/templates/views-ui-container.html.twig b/core/modules/views_ui/templates/views-ui-container.html.twig new file mode 100644 index 0000000000000000000000000000000000000000..d45b158af745939c08ceb072ce412e529fc27312 --- /dev/null +++ b/core/modules/views_ui/templates/views-ui-container.html.twig @@ -0,0 +1,15 @@ +{# +/** + * @file + * Default theme implementation for a generic views UI container/wrapper. + * + * Available variables: + * - attributes: HTML attributes to apply to the container element. + * - children: The remaining elements such as dropbuttons and tabs. + * + * @see template_preprocess_views_ui_container() + * + * @ingroup themeable + */ +#} +{{ children }} diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 9074ab327dd51ee89d657136ba05362223f93f39..295c8054d96cc973291a9371d1a0acafa9357d9b 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -162,7 +162,8 @@ function views_ui_theme() { // Generic container wrapper, to use instead of theme_container when an id // is not desired. 'views_ui_container' => array( - 'render element' => 'element', + 'variables' => array('children' => NULL, 'attributes' => array()), + 'template' => 'views-ui-container', 'file' => 'views_ui.theme.inc', ), ); diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index 61bff4deae14b67e15cbdbe51c11f83b31814b7a..acd45737efbe134398a2d4721e1c694dbcde6d9a 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -7,14 +7,6 @@ use Drupal\Core\Template\Attribute; -/** - * Generic
container function. - */ -function theme_views_ui_container($variables) { - $element = $variables['element']; - return '' . $element['#children'] . '
'; -} - /** * Prepares variables for Views UI display tab setting templates. *