function shortcut_set_title_exists
Same name and namespace in other branches
- 7.x modules/shortcut/shortcut.module \shortcut_set_title_exists()
Check to see if a shortcut set with the given title already exists.
Parameters
$title: Human-readable name of the shortcut set to check.
Return value
TRUE if a shortcut set with that title exists; FALSE otherwise.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0.
File
-
core/
modules/ shortcut/ shortcut.module, line 239
Code
function shortcut_set_title_exists($title) {
$sets = ShortcutSet::loadMultiple();
foreach ($sets as $set) {
if ($set->label() == $title) {
return TRUE;
}
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.