Merge pull request #5327 from colemanw/totten-master-headerlist
[civicrm-core.git] / api / v3 / MailingComponent.php
index db953772ed44c1f112fe351f6f833bf0fb338611..a44f6fd36efc9ec8278109b2788494831d918d91 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 /**
- * This api exposes CiviCRM MailingComponent.
+ * This api exposes CiviCRM MailingComponent (header and footer).
  *
  * @package CiviCRM_APIv3
  */
@@ -56,6 +56,16 @@ function civicrm_api3_mailing_component_get($params) {
   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.
  *