function _bootstrap_tour_name_exists in Bootstrap Tour 7.2
/* Function to check if the machine name already exists.
1 string reference to '_bootstrap_tour_name_exists'
- bootstrap_tour_form in includes/
bootstrap_tour.admin.inc - Implements hook_form().
File
- includes/
bootstrap_tour.admin.inc, line 113 - The file for admin forms and functionality for the bootstrap_tour entity
Code
function _bootstrap_tour_name_exists($name, $element, &$form_state) {
$result = db_query('SELECT bootstrap_tour_id from {bootstrap_tour_tour} WHERE name = :name LIMIT 1', array(
':name' => $name,
));
return $result
->rowCount() == 0 ? FALSE : TRUE;
}