diff --git a/core/modules/views/templates/views-view-mapping-test.html.twig b/core/modules/views/templates/views-view-mapping-test.html.twig new file mode 100644 index 0000000..eacaa84 --- /dev/null +++ b/core/modules/views/templates/views-view-mapping-test.html.twig @@ -0,0 +1,14 @@ +{# +/** + * @file + * Default theme implementation for testing the mapping row style. + * + * Available variables: + * - element: The view content. + * + * @see template_preprocess_views_view_mapping_test() + * + * @ingroup themeable + */ +#} +{{ element }} diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.module b/core/modules/views/tests/modules/views_test_data/views_test_data.module index a3c644b..b00f8e8 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.module +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.module @@ -67,7 +67,15 @@ function views_test_data_preprocess_views_view_table(&$variables) { } /** - * Implements hook_preprocess_HOOK() for theme_views_view_mapping_test(). + * Prepares variables for the mapping row style test templates. + * + * Default template: views-view-mapping-test.html.twig. + * + * @param array $variables + * An associative array containing: + * - rows: A list of view rows. + * - options: Various view options, including the row style mapping. + * - view: The view object. */ function template_preprocess_views_view_mapping_test(&$variables) { $variables['element'] = array(); @@ -114,10 +122,3 @@ function template_preprocess_views_view_mapping_test(&$variables) { } } } - -/** - * Returns HTML for the Mapping Test style. - */ -function theme_views_view_mapping_test($variables) { - return drupal_render($variables['element']); -}