Commit 5b3959b2 authored by tim.plunkett's avatar tim.plunkett

Issue #1773832 by tim.plunkett: Replace usage of drupal_attributes().

parent c09fe055
......@@ -5,6 +5,8 @@
* Preprocessors and helper functions to make theming easier.
*/
use Drupal\Core\Template\Attribute;
/**
* Provide a full array of possible themes to try for a given hook.
*
......@@ -886,7 +888,7 @@ function template_preprocess_views_view_rss(&$vars) {
}
$vars['langcode'] = check_plain(language(LANGUAGE_TYPE_INTERFACE)->langcode);
$vars['namespaces'] = drupal_attributes($style->namespaces);
$vars['namespaces'] = new Attribute($style->namespaces);
$vars['items'] = $items;
$vars['channel_elements'] = format_xml_elements($style->channel_elements);
......@@ -1086,7 +1088,7 @@ function theme_views_mini_pager($vars) {
*/
function theme_views_container($variables) {
$element = $variables['element'];
return '<div' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</div>';
return '<div' . new Attribute($element['#attributes']) . '>' . $element['#children'] . '</div>';
}
/**
......
......@@ -17,6 +17,9 @@
* field id, then row number. This matches the index in $rows.
* @ingroup views_templates
*/
use Drupal\Core\Template\Attribute;
?>
<table <?php print $attributes; ?>>
<?php if (!empty($title)) : ?>
......@@ -37,7 +40,7 @@
<?php foreach ($rows as $row_count => $row): ?>
<tr <?php if ($row_classes[$row_count]) { print 'class="' . implode(' ', $row_classes[$row_count]) .'"'; } ?>>
<?php foreach ($row as $field => $content): ?>
<td <?php if ($field_classes[$field][$row_count]) { print 'class="'. $field_classes[$field][$row_count] . '" '; } ?><?php print drupal_attributes($field_attributes[$field][$row_count]); ?>>
<td <?php if ($field_classes[$field][$row_count]) { print 'class="'. $field_classes[$field][$row_count] . '" '; } ?><?php print new Attribute($field_attributes[$field][$row_count]); ?>>
<?php print $content; ?>
</td>
<?php endforeach; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment