Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19813 - Unify Symfony Events and hooks #9949

Merged
merged 18 commits into from
Apr 11, 2017
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
241bda3
CRM-19813 - CRM_Utils_Hook_UnitTests::invoke() - Fix return handling
totten Mar 4, 2017
354345c
CRM-19813 - CRM_Utils_Hook_* - Rename invoke() to invokeViaUF()
totten Mar 7, 2017
9897fb1
CRM-19813 - Civi::dispatcher() - Add lookup helper
totten Mar 8, 2017
762dc04
CRM-19813 - GenericHookEvent - Bridge between Symfony Events and hooks
totten Mar 3, 2017
c73e309
CRM-19813 - CRM_Utils_Hook - Cleanup existing dual-emit events
totten Mar 3, 2017
63b1853
CRM-19813 - CRM_Utils_Hook::container() - Continue using legacy hooks
totten Mar 7, 2017
e24a07e
CRM-19813 - CRM_Utils_Hook::invoke() - Use dispatcher when possible
totten Mar 7, 2017
6a8f168
CRM-19813 - CRM_Utils_Hook - Set names for `links`, `preProcess`, eta…
totten Mar 7, 2017
ba9d43d
CRM-19813 - CRM_Utils_Hook - Set names for `managed`, `dashboard`, et…
totten Mar 7, 2017
9c42b57
CRM-19813 - CRM_Utils_Hook - Set names for `tokenValue`, `pageRun`, e…
totten Mar 7, 2017
5b3f2d4
CRM-19813 - CRM_Utils_Hook - Set names for `mailingTemplateTypes`, et…
totten Mar 7, 2017
d128571
CRM-19813 - CRM_Utils_Hook - Set names for `config`, `optionValues`, …
totten Mar 16, 2017
b95f41f
CRM-19813 - CRM_Utils_Hook - Set names for `alterAPIPermissions`, eta…
totten Mar 16, 2017
027e669
CRM-19813 - CRM_Utils_Hook - Set names for `alterReportVar`, etal (10x)
totten Mar 16, 2017
fb1d9ad
CRM-19813 - CRM_Utils_Hook - Set names for `entityTypes`, etal (10x)
totten Mar 16, 2017
5d4ba3b
CRM-19813 - CRM_Utils_Hook - Set names for `dashboard_defaults`, etal…
totten Mar 16, 2017
0d68139
(NFC) GenericHookEvent - Update docblocks
totten Mar 28, 2017
0fcad35
CRM-19813 - CRM_Utils_Hook - Don't allow conflicts in property names
totten Mar 31, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CRM-19813 - CRM_Utils_Hook - Set names for entityTypes, etal (10x)
  • Loading branch information
totten committed Mar 30, 2017
commit fb1d9ad2f5116245ba3488a26f8e0b065f328006
20 changes: 10 additions & 10 deletions CRM/Utils/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ public static function unhandledException($exception, $request = NULL) {
* The return value is ignored
*/
public static function entityTypes(&$entityTypes) {
return self::singleton()->invoke(1, $entityTypes, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('entityTypes'), $entityTypes, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_entityTypes'
);
}
Expand All @@ -1845,7 +1845,7 @@ public static function entityTypes(&$entityTypes) {
* @return mixed
*/
public static function buildProfile($name) {
return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('name'), $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_buildProfile');
}

Expand All @@ -1856,7 +1856,7 @@ public static function buildProfile($name) {
* @return mixed
*/
public static function validateProfile($name) {
return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('name'), $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_validateProfile');
}

Expand All @@ -1867,7 +1867,7 @@ public static function validateProfile($name) {
* @return mixed
*/
public static function processProfile($name) {
return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('name'), $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_processProfile');
}

Expand All @@ -1878,7 +1878,7 @@ public static function processProfile($name) {
* @return mixed
*/
public static function viewProfile($name) {
return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('name'), $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_viewProfile');
}

Expand All @@ -1889,7 +1889,7 @@ public static function viewProfile($name) {
* @return mixed
*/
public static function searchProfile($name) {
return self::singleton()->invoke(1, $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
return self::singleton()->invoke(array('name'), $name, self::$_nullObject, self::$_nullObject, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_searchProfile');
}

Expand All @@ -1910,7 +1910,7 @@ public static function searchProfile($name) {
*/
public static function alterBadge($labelName, &$label, &$format, &$participant) {
return self::singleton()
->invoke(4, $labelName, $label, $format, $participant, self::$_nullObject, self::$_nullObject, 'civicrm_alterBadge');
->invoke(array('labelName', 'label', 'format', 'participant'), $labelName, $label, $format, $participant, self::$_nullObject, self::$_nullObject, 'civicrm_alterBadge');
}


Expand All @@ -1927,7 +1927,7 @@ public static function alterBadge($labelName, &$label, &$format, &$participant)
* @return mixed
*/
public static function alterBarcode(&$data, $type = 'barcode', $context = 'name_badge') {
return self::singleton()->invoke(3, $data, $type, $context, self::$_nullObject,
return self::singleton()->invoke(array('data', 'type', 'context'), $data, $type, $context, self::$_nullObject,
self::$_nullObject, self::$_nullObject, 'civicrm_alterBarcode');
}

Expand All @@ -1946,7 +1946,7 @@ public static function alterBarcode(&$data, $type = 'barcode', $context = 'name_
*/
public static function alterMailer(&$mailer, $driver, $params) {
return self::singleton()
->invoke(3, $mailer, $driver, $params, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_alterMailer');
->invoke(array('mailer', 'driver', 'params'), $mailer, $driver, $params, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_alterMailer');
}

/**
Expand Down Expand Up @@ -1979,7 +1979,7 @@ public static function alterMail(&$mailer, $driver, $params) {
*/
public static function queryObjects(&$queryObjects, $type = 'Contact') {
return self::singleton()
->invoke(2, $queryObjects, $type, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_queryObjects');
->invoke(array('queryObjects', 'type'), $queryObjects, $type, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_queryObjects');
}

/**
Expand Down