diff options
author | Mansimran7 | 2019-07-02 16:35:03 +0530 |
---|---|---|
committer | Mansimran7 | 2019-07-02 16:35:03 +0530 |
commit | 9559627382612bd2c8ed1df7f590d510a9bdae99 (patch) | |
tree | 7c2433ed7b418a29ca6d6659774288614f8696fa /modules/mansimran/student_clubs/student_clubs.install | |
parent | 4e585c030ed6b5ea73b77a696a78f8855d9a26d8 (diff) | |
download | acadmix_distribution-9559627382612bd2c8ed1df7f590d510a9bdae99.tar.gz acadmix_distribution-9559627382612bd2c8ed1df7f590d510a9bdae99.tar.bz2 acadmix_distribution-9559627382612bd2c8ed1df7f590d510a9bdae99.zip |
added all the .install files and views yml files
Diffstat (limited to 'modules/mansimran/student_clubs/student_clubs.install')
-rw-r--r-- | modules/mansimran/student_clubs/student_clubs.install | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/mansimran/student_clubs/student_clubs.install b/modules/mansimran/student_clubs/student_clubs.install new file mode 100644 index 0000000..46d2066 --- /dev/null +++ b/modules/mansimran/student_clubs/student_clubs.install @@ -0,0 +1,27 @@ + +<?php +/** +* Implements hook_uninstall(). +*/ +function student_clubs_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', 'club_and_chapter'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + |