From 4e585c030ed6b5ea73b77a696a78f8855d9a26d8 Mon Sep 17 00:00:00 2001 From: Mansimran7 Date: Tue, 2 Jul 2019 12:16:59 +0530 Subject: pushing all custom modules --- .../administrative_offices.install | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/mansimran/administrative_offices/administrative_offices.install (limited to 'modules/mansimran/administrative_offices/administrative_offices.install') diff --git a/modules/mansimran/administrative_offices/administrative_offices.install b/modules/mansimran/administrative_offices/administrative_offices.install new file mode 100644 index 0000000..7985f05 --- /dev/null +++ b/modules/mansimran/administrative_offices/administrative_offices.install @@ -0,0 +1,27 @@ + +getStorage('node'); + + + + // Query all entity. + $query = $queryFactory->get('node') +// <-- replace event in below line with your content type machine name + ->condition('type', 'administrative_offices'); + $nids = $query->execute(); + + + + // Delete entities. + if (!empty($nids)) { + $entities = $nodeStorage->loadMultiple($nids); + $nodeStorage->delete($entities); + } +} + -- cgit