public function WebformCompositeSourceForm::exist in Webform Composite Tools 8
Helper function to check whether an composite id is already in use.
File
- src/
Form/ WebformCompositeSourceForm.php, line 137
Class
- WebformCompositeSourceForm
- Form handler for the Composite source editing form.
Namespace
Drupal\webform_composite\FormCode
public function exist($id) {
$entity = $this->entityTypeManager
->getStorage('webform_composite')
->getQuery()
->condition('id', $id)
->execute();
return (bool) $entity;
}