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