summaryrefslogtreecommitdiff
path: root/modules/esha/labmanual/labmanual.install
diff options
context:
space:
mode:
authorNitesh Kumar Sinha2019-07-02 17:40:53 +0530
committerGitHub2019-07-02 17:40:53 +0530
commit58dbf8fcb04c01c338b9e346b8266690c8b92a2f (patch)
treeab16a85a8213c31f2abaf34e9d7df44a0f7132ac /modules/esha/labmanual/labmanual.install
parentc63a20a2e293cb104027480a5770406e3f17c514 (diff)
parent0d50e51638dac37bb5133b5024f2e44811e2745e (diff)
downloadacadmix_distribution-58dbf8fcb04c01c338b9e346b8266690c8b92a2f.tar.gz
acadmix_distribution-58dbf8fcb04c01c338b9e346b8266690c8b92a2f.tar.bz2
acadmix_distribution-58dbf8fcb04c01c338b9e346b8266690c8b92a2f.zip
Merge pull request #15 from FOSSEE/stage
merging Stage into master
Diffstat (limited to 'modules/esha/labmanual/labmanual.install')
-rw-r--r--modules/esha/labmanual/labmanual.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/esha/labmanual/labmanual.install b/modules/esha/labmanual/labmanual.install
new file mode 100644
index 0000000..e2c0ed3
--- /dev/null
+++ b/modules/esha/labmanual/labmanual.install
@@ -0,0 +1,22 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function labmanual_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', 'lab_manual');
+ $nids = $query->execute();
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}