3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * APIv3 functions for registering/processing mailing group events.
16 * @package CiviCRM_APIv3
20 * Subscribe from mailing group.
22 * @param array $params
27 function civicrm_api3_mailing_event_resubscribe_create($params) {
29 $groups = CRM_Mailing_Event_BAO_Resubscribe
::resub_to_mailing(
31 $params['event_queue_id'],
36 CRM_Mailing_Event_BAO_Resubscribe
::send_resub_response(
37 $params['event_queue_id'],
41 return civicrm_api3_create_success($params);
43 return civicrm_api3_create_error('Queue event could not be found');
47 * Adjust Metadata for Create action.
49 * The metadata is used for setting defaults, documentation & validation.
51 * @param array $params
52 * Array of parameters determined by getfields.
54 function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) {
55 $params['event_queue_id'] = [
57 'title' => 'Event Queue ID',
58 'type' => CRM_Utils_Type
::T_INT
,
63 'type' => CRM_Utils_Type
::T_INT
,
68 'type' => CRM_Utils_Type
::T_STRING
,