shortcut_set_title_exists($title)
Check to see if a shortcut set with the given title already exists.
$title: Human-readable name of the shortcut set to check.
TRUE if a shortcut set with that title exists; FALSE otherwise.
function shortcut_set_title_exists($title) { $sets = ShortcutSet::loadMultiple(); foreach ($sets as $set) { if ($set->label() == $title) { return TRUE; } } return FALSE; }
© 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/core!modules!shortcut!shortcut.module/function/shortcut_set_title_exists/8.1.x