public function TagForm::exists in Extensible BBCode 4.0.x
Same name and namespace in other branches
- 8.3 src/Form/TagForm.php \Drupal\xbbcode\Form\TagForm::exists()
Determines if the tag already exists.
Parameters
string $tag_id: The tag ID.
Return value
bool TRUE if the tag exists, FALSE otherwise.
File
- src/
Form/ TagForm.php, line 175
Class
- TagForm
- Base form for creating and editing custom tags.
Namespace
Drupal\xbbcode\FormCode
public function exists(string $tag_id) : bool {
return (bool) $this->storage
->getQuery()
->condition('id', $tag_id)
->execute();
}