Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -149,7 +149,7 @@ function toolbar_toolbar() {
|
|||
],
|
||||
],
|
||||
'#wrapper_attributes' => [
|
||||
'class' => ['hidden', 'home-toolbar-tab'],
|
||||
'class' => ['home-toolbar-tab'],
|
||||
],
|
||||
'#attached' => [
|
||||
'library' => [
|
||||
|
|
@ -217,7 +217,7 @@ function toolbar_toolbar() {
|
|||
* @return array
|
||||
* The updated renderable array.
|
||||
*
|
||||
* @see drupal_render()
|
||||
* @see \Drupal\Core\Render\RendererInterface::render()
|
||||
*/
|
||||
function toolbar_prerender_toolbar_administration_tray(array $element) {
|
||||
$menu_tree = \Drupal::service('toolbar.menu_tree');
|
||||
|
|
@ -276,6 +276,18 @@ function toolbar_menu_navigation_links(array $tree) {
|
|||
return $tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for HTML document templates.
|
||||
*/
|
||||
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']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the rendered subtree of each top-level toolbar link.
|
||||
*
|
||||
|
|
@ -333,7 +345,7 @@ function _toolbar_do_get_rendered_subtrees(array $data) {
|
|||
// Many routes have dots as route name, while some special ones like <front>
|
||||
// have <> characters in them.
|
||||
$url = $link->getUrlObject();
|
||||
$id = str_replace(['.', '<', '>'], ['-', '', '' ], $url->isRouted() ? $url->getRouteName() : $url->getUri());
|
||||
$id = str_replace(['.', '<', '>'], ['-', '', ''], $url->isRouted() ? $url->getRouteName() : $url->getUri());
|
||||
|
||||
$subtrees[$id] = $output;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue