* The ChainSubscriber looks for API parameters which specify a nested or
* chained API call. For example:
*
- * @code
+ * ```
* $result = civicrm_api('Contact', 'create', array(
* 'version' => 3,
* 'first_name' => 'Amy',
* 'location_type_id' => 123,
* ),
* ));
- * @endcode
+ * ```
*
* The ChainSubscriber looks for any parameters of the form "api.Email.create";
* if found, it issues the nested API call (and passes some extra context --
*/
public static function getSubscribedEvents() {
return [
- Events::RESPOND => ['onApiRespond', Events::W_EARLY],
+ 'civi.api.respond' => ['onApiRespond', Events::W_EARLY],
];
}
$subaction = empty($subAPI[2]) ? $action : $subAPI[2];
$subParams = [
- 'debug' => \CRM_Utils_Array::value('debug', $params),
+ 'debug' => $params['debug'] ?? NULL,
];
$subEntity = _civicrm_api_get_entity_name_from_camel($subAPI[1]);