generalized hook (CRM-12864)

made changes to accomodate the new generalized hook for events