diff options
author | Mansimran7 | 2019-07-02 12:16:59 +0530 |
---|---|---|
committer | Mansimran7 | 2019-07-02 12:16:59 +0530 |
commit | 4e585c030ed6b5ea73b77a696a78f8855d9a26d8 (patch) | |
tree | a9dd98d2648c35aa2357eb7bc473469f6cc8d417 /modules/mansimran/academic_research/academic_research.install | |
parent | 3ad1b8d590d7d11d83e8c923970690900dc31f70 (diff) | |
download | acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.gz acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.tar.bz2 acadmix_distribution-4e585c030ed6b5ea73b77a696a78f8855d9a26d8.zip |
pushing all custom modules
Diffstat (limited to 'modules/mansimran/academic_research/academic_research.install')
-rw-r--r-- | modules/mansimran/academic_research/academic_research.install | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/mansimran/academic_research/academic_research.install b/modules/mansimran/academic_research/academic_research.install new file mode 100644 index 0000000..af9eeb5 --- /dev/null +++ b/modules/mansimran/academic_research/academic_research.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function academic_research_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', 'academic_research_'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + |