$params]; } $entityBatch = new CRM_Batch_DAO_EntityBatch(); $entityId = $params['id'] ?? NULL; CRM_Utils_Hook::pre('delete', 'EntityBatch', $entityId, $params); $entityBatch->copyValues($params); $entityBatch->delete(); CRM_Utils_Hook::post('delete', 'EntityBatch', $entityBatch->id, $entityBatch); return $entityBatch; } }