From 3370a7b10e00db4a87416cd1a179bbcdce07cbe2 Mon Sep 17 00:00:00 2001 From: Michael Devery Date: Wed, 21 Mar 2018 16:33:52 +0000 Subject: [PATCH] CRM-21849: Allow spec modification for getoptions Allows to modify spec even if generic getoptions function is used --- api/v3/Generic.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/v3/Generic.php b/api/v3/Generic.php index b6d0bb1cac..848d4731bc 100644 --- a/api/v3/Generic.php +++ b/api/v3/Generic.php @@ -475,6 +475,13 @@ function _civicrm_api3_generic_getoptions_spec(&$params, $apiRequest) { } } } + + $entityName = _civicrm_api_get_entity_name_from_camel($apiRequest['entity']); + $getOptionsSpecFunction = '_civicrm_api3_' . $entityName . '_getoptions_spec'; + + if (function_exists($getOptionsSpecFunction)) { + $getOptionsSpecFunction($params); + } } /** -- 2.25.1