Issue #2917653 by markcarver, bojan_dev, dww, idebr, lauriii: toolbar_preprocess_html() converts attributes from array to Attribute object

8.7.x
Nathaniel Catchpole 2019-02-22 12:17:02 +00:00
parent d0a2440cff
commit c5b88d8048
1 changed files with 4 additions and 3 deletions

View File

@ -295,9 +295,10 @@ function toolbar_preprocess_html(&$variables) {
if (!\Drupal::currentUser()->hasPermission('access toolbar')) {
return;
}
$variables['attributes'] = new Attribute($variables['attributes']);
$variables['attributes']->addClass(['toolbar-tray-open', 'toolbar-horizontal', 'toolbar-fixed', 'toolbar-loading']);
$variables['attributes']['class'][] = 'toolbar-tray-open';
$variables['attributes']['class'][] = 'toolbar-horizontal';
$variables['attributes']['class'][] = 'toolbar-fixed';
$variables['attributes']['class'][] = 'toolbar-loading';
}
/**