From: Tobias Lounsbury Date: Thu, 17 Mar 2016 20:01:41 +0000 (-0700) Subject: Added call to hook_civicrm_fieldOptions() from within CRM_Core_PseudoConstant::get... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ca0f1c4b5969344181feb71df9a625c30dc9c2e8;p=civicrm-core.git Added call to hook_civicrm_fieldOptions() from within CRM_Core_PseudoConstant::get() for fields that validate against a callback. --- diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 509a3ea29d..4c90b16946 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -252,7 +252,10 @@ class CRM_Core_PseudoConstant { // if callback is specified.. if (!empty($pseudoconstant['callback'])) { - return call_user_func(Civi\Core\Resolver::singleton()->get($pseudoconstant['callback'])); + $fieldOptions = call_user_func(Civi\Core\Resolver::singleton()->get($pseudoconstant['callback'])); + //CRM-18223: Allow additions to field options via hook. + CRM_Utils_Hook::fieldOptions($entity, $fieldName, $fieldOptions, $params); + return $fieldOptions; } // Merge params with schema defaults