You are here

function webform_content_creator_node_type_delete in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 webform_content_creator.module \webform_content_creator_node_type_delete()

Implements hook_node_type_delete().

File

./webform_content_creator.module, line 70
Allows to call functions after creating/editing/deleting webform submissions.

Code

function webform_content_creator_node_type_delete(EntityInterface $entity) {
  $entities = \Drupal::entityTypeManager()
    ->getStorage('webform_content_creator')
    ->loadMultiple();
  foreach ($entities as $e) {
    if ($e
      ->equalsContentType($entity
      ->id())) {
      $e
        ->delete();
    }
  }
}