From: Tim Otten Date: Fri, 14 Apr 2017 01:46:00 +0000 (-0700) Subject: CRM_Utils_Hook::hooks - Prettify X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0093206723e007f1f7d6f1d69e9b2ccb193949dc;p=civicrm-core.git CRM_Utils_Hook::hooks - Prettify --- 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. *