summaryrefslogtreecommitdiff
path: root/modules/kalpesh/members/members.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/kalpesh/members/members.install')
-rw-r--r--modules/kalpesh/members/members.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/kalpesh/members/members.install b/modules/kalpesh/members/members.install
new file mode 100644
index 0000000..bb3a6cf
--- /dev/null
+++ b/modules/kalpesh/members/members.install
@@ -0,0 +1,26 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function members_uninstall() { //<-- replace “welcome” with your module machine name
+ // Load services.
+ $queryFactory = \Drupal::service('entity.query');
+ $nodeStorage = \Drupal::entityManager()->getStorage('node');
+
+
+
+ // Query all entity.
+ $query = $queryFactory->get('node')
+// <-- replace event in below line with your content type machine name
+ ->condition('type', 'members');
+ $nids = $query->execute();
+
+
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}