function webform_access_field_storage_config_delete in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_access/webform_access.module \webform_access_field_storage_config_delete()
Implements hook_field_storage_config_delete().
File
- modules/
webform_access/ webform_access.module, line 97 - Provides webform access controls for webform nodes.
Code
function webform_access_field_storage_config_delete(EntityInterface $entity) {
/** @var Drupal\field\Entity\FieldStorageConfig $entity */
if ($entity
->getType() === 'webform') {
\Drupal::database()
->delete('webform_access_group_entity')
->condition('entity_type', $entity
->getEntityTypeId())
->condition('field_name', $entity
->getName())
->execute();
}
}