Rename hook_civicrm_hooks to hook_civicrm_eventDefs
authorTim Otten <totten@civicrm.org>
Fri, 14 Apr 2017 02:28:14 +0000 (19:28 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 14 Apr 2017 03:20:45 +0000 (20:20 -0700)
CRM/Utils/Hook.php
Civi/API/Events.php
Civi/Core/CiviEventInspector.php
Civi/Core/Container.php
Civi/Core/Event/SystemInstallEvent.php

index 7ddcf0a990c48e434bbfb8405337528f1330d1b2..28462ccf971abd9de0bfddeaff4edaab1c6d65a3 100644 (file)
@@ -1846,11 +1846,11 @@ abstract class CRM_Utils_Hook {
    *
    * @param \Civi\Core\CiviEventInspector $inspector
    */
-  public static function hooks($inspector) {
+  public static function eventDefs($inspector) {
     $event = \Civi\Core\Event\GenericHookEvent::create(array(
       'inspector' => $inspector,
     ));
-    Civi::dispatcher()->dispatch('hook_civicrm_hooks', $event);
+    Civi::dispatcher()->dispatch('hook_civicrm_eventDefs', $event);
   }
 
   /**
index 0faa4502fafab8065e744699081e709e6c9a063f..3f14a2ef5cccad247f86db57b0391fc8df6d1c7c 100644 (file)
@@ -107,7 +107,7 @@ class Events {
 
   /**
    * @param \Civi\Core\Event\GenericHookEvent $e
-   * @see \CRM_Utils_Hook::hooks
+   * @see \CRM_Utils_Hook::eventDefs
    */
   public static function hookEventDefs($e) {
     $e->inspector->addEventClass(self::AUTHORIZE, 'Civi\API\Event\AuthorizeEvent');
index 769d2f393d45294052b87bbe65f3467c06b9ff42..d5d3678607239cddd59dad6fe195526241317bba 100644 (file)
@@ -22,7 +22,7 @@ class CiviEventInspector {
    * Register the default hooks defined by 'CRM_Utils_Hook'.
    *
    * @param \Civi\Core\Event\GenericHookEvent $e
-   * @see \CRM_Utils_Hook::hooks()
+   * @see \CRM_Utils_Hook::eventDefs()
    */
   public static function findBuiltInEvents(\Civi\Core\Event\GenericHookEvent $e) {
     $skipList = array('singleton');
@@ -49,7 +49,7 @@ class CiviEventInspector {
   public function build($force = FALSE) {
     if ($force || $this->eventDefs === NULL) {
       $this->eventDefs = array();
-      \CRM_Utils_Hook::hooks($this);
+      \CRM_Utils_Hook::eventDefs($this);
       ksort($this->eventDefs);
     }
     return $this;
index f369580a034d35c480920883b93404ad69b01e2e..97e23379cfb85219ab92454b5551a01aa7359b6d 100644 (file)
@@ -250,10 +250,10 @@ class Container {
     $dispatcher->addListener('hook_civicrm_post::Case', array('\Civi\CCase\Events', 'fireCaseChange'));
     $dispatcher->addListener('hook_civicrm_caseChange', array('\Civi\CCase\Events', 'delegateToXmlListeners'));
     $dispatcher->addListener('hook_civicrm_caseChange', array('\Civi\CCase\SequenceListener', 'onCaseChange_static'));
-    $dispatcher->addListener('hook_civicrm_hooks', array('\Civi\Core\CiviEventInspector', 'findBuiltInEvents'));
+    $dispatcher->addListener('hook_civicrm_eventDefs', array('\Civi\Core\CiviEventInspector', 'findBuiltInEvents'));
     // TODO We need a better code-convention for metadata about non-hook events.
-    $dispatcher->addListener('hook_civicrm_hooks', array('\Civi\API\Events', 'hookEventDefs'));
-    $dispatcher->addListener('hook_civicrm_hooks', array('\Civi\Core\Event\SystemInstallEvent', 'hookEventDefs'));
+    $dispatcher->addListener('hook_civicrm_eventDefs', array('\Civi\API\Events', 'hookEventDefs'));
+    $dispatcher->addListener('hook_civicrm_eventDefs', array('\Civi\Core\Event\SystemInstallEvent', 'hookEventDefs'));
     $dispatcher->addListener('civi.dao.postInsert', array('\CRM_Core_BAO_RecurringEntity', 'triggerInsert'));
     $dispatcher->addListener('civi.dao.postUpdate', array('\CRM_Core_BAO_RecurringEntity', 'triggerUpdate'));
     $dispatcher->addListener('civi.dao.postDelete', array('\CRM_Core_BAO_RecurringEntity', 'triggerDelete'));
index 7957fd96a30842960ed1e445229cbff2d18ad418..e3e8d4f001a66449e8b0fc8a6a4409dcafb004ac 100644 (file)
@@ -40,7 +40,7 @@ class SystemInstallEvent extends \Symfony\Component\EventDispatcher\Event {
 
   /**
    * @param \Civi\Core\Event\GenericHookEvent $e
-   * @see \CRM_Utils_Hook::hooks
+   * @see \CRM_Utils_Hook::eventDefs
    */
   public static function hookEventDefs($e) {
     $e->inspector->addEventClass(self::EVENT_NAME, __CLASS__);