Skip to content
Snippets Groups Projects
Commit c1d947b6 authored by catch's avatar catch
Browse files

Issue #2713923 by NickWilde, markdorison: A Few attributes/new Attribute()...

Issue #2713923 by NickWilde, markdorison: A Few attributes/new Attribute() calls use strings instead of array for classes
parent a469aa22
No related branches found
No related tags found
No related merge requests found
...@@ -207,7 +207,7 @@ function template_preprocess_fieldset(&$variables) { ...@@ -207,7 +207,7 @@ function template_preprocess_fieldset(&$variables) {
$variables['legend']['attributes'] = new Attribute(); $variables['legend']['attributes'] = new Attribute();
// Add 'visually-hidden' class to legend span. // Add 'visually-hidden' class to legend span.
if ($variables['title_display'] == 'invisible') { if ($variables['title_display'] == 'invisible') {
$variables['legend_span']['attributes'] = new Attribute(array('class' => 'visually-hidden')); $variables['legend_span']['attributes'] = new Attribute(['class' => ['visually-hidden']]);
} }
else { else {
$variables['legend_span']['attributes'] = new Attribute(); $variables['legend_span']['attributes'] = new Attribute();
......
...@@ -618,11 +618,11 @@ function template_preprocess_views_view_table(&$variables) { ...@@ -618,11 +618,11 @@ function template_preprocess_views_view_table(&$variables) {
if (empty($variables['rows']) && !empty($options['empty_table'])) { if (empty($variables['rows']) && !empty($options['empty_table'])) {
$build = $view->display_handler->renderArea('empty'); $build = $view->display_handler->renderArea('empty');
$variables['rows'][0]['columns'][0]['content'][0]['field_output'] = $build; $variables['rows'][0]['columns'][0]['content'][0]['field_output'] = $build;
$variables['rows'][0]['attributes'] = new Attribute(array('class' => 'odd')); $variables['rows'][0]['attributes'] = new Attribute(['class' => ['odd']]);
// Calculate the amounts of rows with output. // Calculate the amounts of rows with output.
$variables['rows'][0]['columns'][0]['attributes'] = new Attribute(array( $variables['rows'][0]['columns'][0]['attributes'] = new Attribute(array(
'colspan' => count($variables['header']), 'colspan' => count($variables['header']),
'class' => 'views-empty', 'class' => ['views-empty'],
)); ));
} }
......
...@@ -56,7 +56,7 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -56,7 +56,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['preview'] = array( $form['preview'] = array(
'#weight' => 110, '#weight' => 110,
'#theme_wrappers' => array('container'), '#theme_wrappers' => array('container'),
'#attributes' => array('id' => 'views-live-preview', 'class' => 'views-live-preview'), '#attributes' => ['id' => 'views-live-preview', 'class' => ['views-live-preview']],
'preview' => $view->renderPreview($this->displayID, $args), 'preview' => $view->renderPreview($this->displayID, $args),
); );
} }
......
...@@ -169,7 +169,7 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) { ...@@ -169,7 +169,7 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) {
'#value' => $node->isPublished() ? t('Published') : t('Not published'), '#value' => $node->isPublished() ? t('Published') : t('Not published'),
'#access' => !$node->isNew(), '#access' => !$node->isNew(),
'#attributes' => array( '#attributes' => array(
'class' => 'entity-meta__title', 'class' => ['entity-meta__title'],
), ),
), ),
'changed' => array( 'changed' => array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment