diff options
author | Fahad Israr | 2019-07-04 11:26:16 +0530 |
---|---|---|
committer | Fahad Israr | 2019-07-04 11:26:16 +0530 |
commit | 2208d6c4c515589207c8cb88d3ce156ff086d48b (patch) | |
tree | 3b1ccc63f818189e45617c8977ab7d84616db797 /modules/kalpesh/recruiters/recruiters.install | |
parent | 9f01af7880cf575cf7db322f5f7c1949e89fad0a (diff) | |
parent | 779f770a2022c3792d5e2dae95e0381093fb8989 (diff) | |
download | acadmix_distribution-2208d6c4c515589207c8cb88d3ce156ff086d48b.tar.gz acadmix_distribution-2208d6c4c515589207c8cb88d3ce156ff086d48b.tar.bz2 acadmix_distribution-2208d6c4c515589207c8cb88d3ce156ff086d48b.zip |
Merge branch 'stage' of https://github.com/FOSSEE/acadmix_distribution
Diffstat (limited to 'modules/kalpesh/recruiters/recruiters.install')
-rw-r--r-- | modules/kalpesh/recruiters/recruiters.install | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/kalpesh/recruiters/recruiters.install b/modules/kalpesh/recruiters/recruiters.install new file mode 100644 index 0000000..06b49ac --- /dev/null +++ b/modules/kalpesh/recruiters/recruiters.install @@ -0,0 +1,26 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function recruiters_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', 'recruiters'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} |