From a77c0f8c9af50e66f89616fdf4cfddfc9d86cea1 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 25 Jan 2017 18:23:08 +0530 Subject: [PATCH] CRM-19929: also add pre hook for delete --- CRM/Core/BAO/EntityTag.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index a935a20e63..0a25446638 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -114,6 +114,11 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { * (reference ) an assoc array of name/value pairs. */ public static function del(&$params) { + //invoke pre hook + if (!empty($params['tag_id'])) { + CRM_Utils_Hook::pre('delete', 'EntityTag', $params['tag_id'], $params); + } + $entityTag = new CRM_Core_BAO_EntityTag(); $entityTag->copyValues($params); $entityTag->delete(); -- 2.25.1