function shortcut_set_load

Loads the data for a shortcut set.

Parameters

$id: The machine-name of the shortcut set to load.

Return value

object If the shortcut set exists, an object containing the following properties:

  • 'id': The internal name of the shortcut set.
  • 'label': The title of the shortcut set.
  • 'links': An array of links associated with this shortcut set.

If the shortcut set does not exist, the function returns FALSE.

14 calls to shortcut_set_load()
LinkDeleteAccessCheck::access in drupal/core/modules/shortcut/lib/Drupal/shortcut/Access/LinkDeleteAccessCheck.php
Checks for access to route.
ShortcutLinksTest::testShortcutLinkAdd in drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
Tests that creating a shortcut works properly.
ShortcutLinksTest::testShortcutLinkChangePath in drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
Tests that changing the path of a shortcut link works.
ShortcutLinksTest::testShortcutLinkDelete in drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
Tests deleting a shortcut link.
ShortcutLinksTest::testShortcutLinkRename in drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php
Tests that shortcut links can be renamed.

... See full list

2 string references to 'shortcut_set_load'
ShortcutFormController::form in drupal/core/modules/shortcut/lib/Drupal/shortcut/ShortcutFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::form().
shortcut_set_switch in drupal/core/modules/shortcut/shortcut.admin.inc
Form callback: builds the form for switching shortcut sets.

File

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

Code

function shortcut_set_load($id) {
  return entity_load('shortcut', $id);
}