function shortcut_set_load
Loads the data for a shortcut set.
Parameters
$set_name: The name of the shortcut set to load.
Return value
object If the shortcut set exists, an object containing the following properties:
- 'set_name': The internal name of the shortcut set.
- 'title': 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()
- ShortcutLinksTestCase::testShortcutLinkAdd in modules/
shortcut/ shortcut.test - Tests that creating a shortcut works properly.
- ShortcutLinksTestCase::testShortcutLinkChangePath in modules/
shortcut/ shortcut.test - Tests that changing the path of a shortcut link works.
- ShortcutLinksTestCase::testShortcutLinkDelete in modules/
shortcut/ shortcut.test - Tests deleting a shortcut link.
- ShortcutLinksTestCase::testShortcutLinkRename in modules/
shortcut/ shortcut.test - Tests that shortcut links can be renamed.
- ShortcutSetsTestCase::testShortcutSetRename in modules/
shortcut/ shortcut.test - Tests renaming a shortcut set.
File
-
modules/
shortcut/ shortcut.module, line 315
Code
function shortcut_set_load($set_name) {
$set = db_select('shortcut_set', 'ss')->fields('ss')
->condition('set_name', $set_name)
->execute()
->fetchObject();
if (!$set) {
return FALSE;
}
$set->links = menu_load_links($set_name);
return $set;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.