function shortcut_renderable_links

Returns an array of shortcut links, suitable for rendering.

Parameters

$shortcut_set Drupal\shortcut\Plugin\Core\Entity\Shortcut: (optional) An object representing the set whose links will be displayed. If not provided, the user's current set will be displayed.

Return value

An array of shortcut links, in the format returned by the menu system.

See also

menu_tree()

2 calls to shortcut_renderable_links()
ShortcutsBlock::build in drupal/core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
Builds and returns the renderable array for this block plugin.
shortcut_toolbar in drupal/core/modules/shortcut/shortcut.module
Implements hook_toolbar().

File

drupal/core/modules/shortcut/shortcut.module, line 465
Allows users to manage customizable lists of shortcut links.

Code

function shortcut_renderable_links($shortcut_set = NULL) {
  if (!isset($shortcut_set)) {
    $shortcut_set = shortcut_current_displayed_set();
  }
  return menu_tree('shortcut-' . $shortcut_set
    ->id());
}