summaryrefslogtreecommitdiff
path: root/modules/mansimran/research_centers/research_centers.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mansimran/research_centers/research_centers.install')
-rw-r--r--modules/mansimran/research_centers/research_centers.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/mansimran/research_centers/research_centers.install b/modules/mansimran/research_centers/research_centers.install
new file mode 100644
index 0000000..2500031
--- /dev/null
+++ b/modules/mansimran/research_centers/research_centers.install
@@ -0,0 +1,27 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function research_centers_uninstall() {
+ // 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', 'research_centers');
+ $nids = $query->execute();
+
+
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}
+