From d5c46f2a974ef6629b5ceff42167a4cda74a51fc Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Wed, 25 Jan 2017 18:39:43 +0530 Subject: [PATCH] CRM-19929: also add pre hook for delete --- CRM/Core/BAO/EntityTag.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/BAO/EntityTag.php b/CRM/Core/BAO/EntityTag.php index 0a25446638..f4b9921ab4 100644 --- a/CRM/Core/BAO/EntityTag.php +++ b/CRM/Core/BAO/EntityTag.php @@ -228,6 +228,10 @@ class CRM_Core_BAO_EntityTag extends CRM_Core_DAO_EntityTag { $numEntitiesNotRemoved = 0; $entityIdsRemoved = array(); + //invoke pre hook for entityTag + $preObject = array($entityIds, $entityTable); + CRM_Utils_Hook::pre('delete', 'EntityTag', $tagId, $preObject); + foreach ($entityIds as $entityId) { // CRM-17350 - check if we have permission to edit the contact // that this tag belongs to. -- 2.25.1