$mailStatus = civicrm_api3('MailingJob', 'get', array());
$groupNames = civicrm_api3('Group', 'get', array());
$headerfooterList = civicrm_api3('MailingComponent', 'get', array(
- 'is_active' => 1,
'options' => array(
'limit' => 0,
),
$mesTemplate = civicrm_api3('MessageTemplate', 'get', array(
'sequential' => 1,
'return' => array("msg_html", "id", "msg_title", "msg_subject", "msg_text"),
- 'is_active' => 1,
'workflow_id' => array('IS NULL' => ""),
));
$mailGrp = civicrm_api3('MailingGroup', 'get', array());
*/
/**
- * This api exposes CiviCRM MailingComponent.
+ * This api exposes CiviCRM MailingComponent (header and footer).
*
* @package CiviCRM_APIv3
*/
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
+/**
+ * Adjust metadata for get.
+ *
+ * @param array $params
+ */
+function _civicrm_api3_mailing_component_get_spec(&$params) {
+ // fetch active records by default
+ $params['is_active']['api.default'] = 1;
+}
+
/**
* Delete a MailingComponent.
*