On this page
function shortcut_set_load
shortcut_set_load($set_name)
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.
File
- modules/shortcut/shortcut.module, line 315
- Allows users to manage customizable lists of shortcut links.
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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!shortcut!shortcut.module/function/shortcut_set_load/7.x