From 0093206723e007f1f7d6f1d69e9b2ccb193949dc Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 13 Apr 2017 18:46:00 -0700 Subject: [PATCH] CRM_Utils_Hook::hooks - Prettify --- CRM/Utils/Hook.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index d552d1dd5c..192d2e6856 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1845,16 +1845,14 @@ abstract class CRM_Utils_Hook { * Build a description of available hooks. * * @param CRM_Utils_Hook_Inspector $inspector - * @return null */ public static function hooks($inspector) { - return self::singleton()->invoke(array('inspector'), $inspector, self::$_nullObject, self::$_nullObject, - self::$_nullObject, self::$_nullObject, self::$_nullObject, - 'civicrm_hooks' - ); + $event = \Civi\Core\Event\GenericHookEvent::create(array( + 'inspector' => $inspector, + )); + Civi::dispatcher()->dispatch('hook_civicrm_hooks', $event); } - /** * This hook is called while preparing a profile form. * -- 2.25.1