6578191efd81d6224aaf07a91dc1dc0b288ee9a2
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / plugin / views / style-preprocess.twig
1 /**
2  * Prepares variables for views-style-{{ plugin_id|u2h }}.html.twig template.
3  */
4 function template_preprocess_views_style_{{ plugin_id }}(&$variables) {
5   $handler = $variables['view']->style_plugin;
6
7   // Fetch wrapper classes from handler options.
8   if ($handler->options['wrapper_class']) {
9     $wrapper_class = explode(' ', $handler->options['wrapper_class']);
10     $variables['attributes']['class'] = array_map('\Drupal\Component\Utility\Html::cleanCssIdentifier', $wrapper_class);
11   }
12
13   template_preprocess_views_view_unformatted($variables);
14 }