CRM_Utils_Hook::hooks - Prettify
authorTim Otten <totten@civicrm.org>
Fri, 14 Apr 2017 01:46:00 +0000 (18:46 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 14 Apr 2017 03:20:45 +0000 (20:20 -0700)
CRM/Utils/Hook.php

index d552d1dd5cd78ef9feb615638fa8b666605d65da..192d2e685644cc039c7761f14527d246bfe84ce8 100644 (file)
@@ -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.
    *