+
+ $entityName = _civicrm_api_get_entity_name_from_camel($apiRequest['entity']);
+ $getOptionsSpecFunction = '_civicrm_api3_' . $entityName . '_getoptions_spec';
+
+ if (function_exists($getOptionsSpecFunction)) {
+ $getOptionsSpecFunction($params);
+ }