From 8f30d0b9d4f1529361a99c7f1fd48bd884a21691 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Wed, 17 May 2017 04:32:53 +0530 Subject: [PATCH] CRM-20588, add pre and post hook invocation for delete option ---------------------------------------- * CRM-20588: Pre and Post hook for Batch https://issues.civicrm.org/jira/browse/CRM-20588 --- CRM/Batch/BAO/Batch.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Batch/BAO/Batch.php b/CRM/Batch/BAO/Batch.php index f747c95f79..e9ebedde33 100644 --- a/CRM/Batch/BAO/Batch.php +++ b/CRM/Batch/BAO/Batch.php @@ -168,9 +168,11 @@ class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch { */ public static function deleteBatch($batchId) { // delete entry from batch table + CRM_Utils_Hook::pre('delete', 'Batch', $batchId, CRM_Core_DAO::$_nullArray); $batch = new CRM_Batch_DAO_Batch(); $batch->id = $batchId; $batch->delete(); + CRM_Utils_Hook::post('delete', 'Batch', $batch->id, $batch); return TRUE; } -- 2.25.1