From ba9d43dca85ea9776f5669a4e4ec9080079dd422 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 7 Mar 2017 14:21:33 -0800 Subject: [PATCH] CRM-19813 - CRM_Utils_Hook - Set names for `managed`, `dashboard`, etal (9x) --- CRM/Utils/Hook.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index fb536fd858..c448a5a2a8 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -596,7 +596,7 @@ abstract class CRM_Utils_Hook { * the return value is ignored */ public static function managed(&$entities) { - return self::singleton()->invoke(1, $entities, + return self::singleton()->invoke(array('entities'), $entities, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_managed' ); @@ -615,7 +615,7 @@ abstract class CRM_Utils_Hook { * the html snippet to include in the dashboard */ public static function dashboard($contactID, &$contentPlacement = self::DASHBOARD_BELOW) { - $retval = self::singleton()->invoke(2, $contactID, $contentPlacement, + $retval = self::singleton()->invoke(array('contactID', 'contentPlacement'), $contactID, $contentPlacement, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_dashboard' ); @@ -641,7 +641,7 @@ abstract class CRM_Utils_Hook { * @return array */ public static function recent(&$recentArray) { - return self::singleton()->invoke(1, $recentArray, + return self::singleton()->invoke(array('recentArray'), $recentArray, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_recent' ); @@ -662,7 +662,7 @@ abstract class CRM_Utils_Hook { * Return is not really intended to be used. */ public static function referenceCounts($dao, &$refCounts) { - return self::singleton()->invoke(2, $dao, $refCounts, + return self::singleton()->invoke(array('dao', 'refCounts'), $dao, $refCounts, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_referenceCounts' ); @@ -681,7 +681,7 @@ abstract class CRM_Utils_Hook { * @return null */ public static function buildAmount($pageType, &$form, &$amount) { - return self::singleton()->invoke(3, $pageType, $form, $amount, self::$_nullObject, + return self::singleton()->invoke(array('pageType', 'form', 'amount'), $pageType, $form, $amount, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_buildAmount'); } @@ -695,7 +695,7 @@ abstract class CRM_Utils_Hook { * @return null */ public static function buildStateProvinceForCountry($countryID, &$states) { - return self::singleton()->invoke(2, $countryID, $states, + return self::singleton()->invoke(array('countryID', 'states'), $countryID, $states, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_buildStateProvinceForCountry' ); @@ -713,7 +713,7 @@ abstract class CRM_Utils_Hook { * @deprecated Use tabset() instead. */ public static function tabs(&$tabs, $contactID) { - return self::singleton()->invoke(2, $tabs, $contactID, + return self::singleton()->invoke(array('tabs', 'contactID'), $tabs, $contactID, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_tabs' ); } @@ -732,7 +732,7 @@ abstract class CRM_Utils_Hook { * @return null */ public static function tabset($tabsetName, &$tabs, $context) { - return self::singleton()->invoke(3, $tabsetName, $tabs, + return self::singleton()->invoke(array('tabsetName', 'tabs', 'context'), $tabsetName, $tabs, $context, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_tabset' ); } @@ -746,7 +746,7 @@ abstract class CRM_Utils_Hook { * @return null */ public static function tokens(&$tokens) { - return self::singleton()->invoke(1, $tokens, + return self::singleton()->invoke(array('tokens'), $tokens, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_tokens' ); } -- 2.25.1