summaryrefslogtreecommitdiff
path: root/modules/mansimran/sae_teams/sae_teams.install
diff options
context:
space:
mode:
authorNitesh Kumar Sinha2019-07-02 12:18:29 +0530
committerGitHub2019-07-02 12:18:29 +0530
commit847360bf5ac011771dc013677542ece7b356a528 (patch)
treee11370475afe87870b8efa2aa8d242a7563329dd /modules/mansimran/sae_teams/sae_teams.install
parent6b65fd6d7fda826b967442aabb10ead6197aa4b2 (diff)
parent4e585c030ed6b5ea73b77a696a78f8855d9a26d8 (diff)
downloadacadmix_distribution-847360bf5ac011771dc013677542ece7b356a528.tar.gz
acadmix_distribution-847360bf5ac011771dc013677542ece7b356a528.tar.bz2
acadmix_distribution-847360bf5ac011771dc013677542ece7b356a528.zip
Merge pull request #4 from Mansimran7/master
Mansimran - custom modules
Diffstat (limited to 'modules/mansimran/sae_teams/sae_teams.install')
-rw-r--r--modules/mansimran/sae_teams/sae_teams.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/mansimran/sae_teams/sae_teams.install b/modules/mansimran/sae_teams/sae_teams.install
new file mode 100644
index 0000000..310ab3d
--- /dev/null
+++ b/modules/mansimran/sae_teams/sae_teams.install
@@ -0,0 +1,26 @@
+
+<?php
+/**
+* Implements hook_uninstall().
+*/
+function sae_teams_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', 'sae_teams_');
+ $nids = $query->execute();
+
+
+
+ // Delete entities.
+ if (!empty($nids)) {
+ $entities = $nodeStorage->loadMultiple($nids);
+ $nodeStorage->delete($entities);
+ }
+}