Skip to content

Commit

Permalink
CRM-20588, add pre and post hook invocation for delete option
Browse files Browse the repository at this point in the history
----------------------------------------
* CRM-20588: Pre and Post hook for Batch
  https://issues.civicrm.org/jira/browse/CRM-20588
  • Loading branch information
pradpnayak committed May 16, 2017
1 parent debff43 commit 4011fbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CRM/Batch/BAO/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ public static function removeBatchEntity($params) {
*/
public static function deleteBatch($batchId) {
// delete entry from batch table
CRM_Utils_Hook::pre('delete', 'Batch', $id, 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;
}

Expand Down

0 comments on commit 4011fbd

Please sign in to comment.