public static function WebformContentCreatorUtilities::existsWebformContentCreatorEntity in Webform Content Creator 3.x
Same name and namespace in other branches
- 8 src/WebformContentCreatorUtilities.php \Drupal\webform_content_creator\WebformContentCreatorUtilities::existsWebformContentCreatorEntity()
- 2.x src/WebformContentCreatorUtilities.php \Drupal\webform_content_creator\WebformContentCreatorUtilities::existsWebformContentCreatorEntity()
Function to check whether an Webform content creator entity exists.
Parameters
string $id: Webform Content Creator id.
Return value
bool True, if the entity already exists.
2 calls to WebformContentCreatorUtilities::existsWebformContentCreatorEntity()
- WebformContentCreatorForm::exist in src/
Form/ WebformContentCreatorForm.php - Helper function to check whether a Webform content creator entity exists.
- WebformContentCreatorManageFieldsForm::exist in src/
Form/ WebformContentCreatorManageFieldsForm.php - Helper function to check whether a Webform content creator entity exists.
File
- src/
WebformContentCreatorUtilities.php, line 32
Class
- WebformContentCreatorUtilities
- Provides useful functions required in Webform content creator module.
Namespace
Drupal\webform_content_creatorCode
public static function existsWebformContentCreatorEntity($id) {
$entity = \Drupal::entityQuery('webform_content_creator')
->condition('id', $id)
->execute();
return (bool) $entity;
}