function xbbcode_custom_tag_exists in Extensible BBCode 8.2
Same name and namespace in other branches
- 8 xbbcode.crud.inc \xbbcode_custom_tag_exists()
- 7 xbbcode.crud.inc \xbbcode_custom_tag_exists()
Check if a custom tag with a certain name exists.
Parameters
$name: The tag name for which to search.
Return value
1 if it exists, 0 if it does not.
1 call to xbbcode_custom_tag_exists()
- XBBCodeTagForm::validateForm in src/
Form/ XBBCodeTagForm.php - Form validation handler.
File
- ./
xbbcode.crud.inc, line 17 - Data interface for creating, reading, updating and deleting records.
Code
function xbbcode_custom_tag_exists($name) {
$query = db_select('xbbcode_custom_tag', 'tag')
->fields('tag')
->condition('name', $name)
->countQuery()
->execute()
->fetchCol(0);
return $query[0];
}