*
* @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);
}
/**
/**
* @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');
* 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');
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;
$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'));
/**
* @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__);