function shortcut_set_title_exists

Same name in other branches
  1. 8.9.x core/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.

3 calls to shortcut_set_title_exists()
shortcut_set_add_form_validate in modules/shortcut/shortcut.admin.inc
Validation handler for shortcut_set_add_form().
shortcut_set_edit_form_validate in modules/shortcut/shortcut.admin.inc
Validation handler for shortcut_set_edit_form().
shortcut_set_switch_validate in modules/shortcut/shortcut.admin.inc
Validation handler for shortcut_set_switch().

File

modules/shortcut/shortcut.module, line 599

Code

function shortcut_set_title_exists($title) {
    return (bool) db_query_range('SELECT 1 FROM {shortcut_set} WHERE title = :title', 0, 1, array(
        ':title' => $title,
    ))->fetchField();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.