function _toolbar_get_subtrees_hash

Same name and namespace in other branches
  1. 9 core/modules/toolbar/toolbar.module \_toolbar_get_subtrees_hash()
  2. 8.9.x core/modules/toolbar/toolbar.module \_toolbar_get_subtrees_hash()
  3. 11.x core/modules/toolbar/toolbar.module \_toolbar_get_subtrees_hash()

Returns the hash of the user-rendered toolbar subtrees and cacheability.

Return value

array An array with the hash of the toolbar subtrees and cacheability.

1 call to _toolbar_get_subtrees_hash()
toolbar_toolbar in core/modules/toolbar/toolbar.module
Implements hook_toolbar().

File

core/modules/toolbar/toolbar.module, line 294

Code

function _toolbar_get_subtrees_hash() {
  [
    $subtrees,
    $cacheability,
  ] = toolbar_get_rendered_subtrees();
  $hash = Crypt::hashBase64(serialize($subtrees));
  return [
    $hash,
    $cacheability,
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.