X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FBatch.php;h=8e01355884c9b851a203d8960d74d6c4cc404cb2;hb=4c4bfe71077ab30c088203b5a9fc0b1673f6d36a;hp=8c5d69a2af3fb6dd6774823a8d39847acef9b22f;hpb=9c2e4fb9824d9913d19a7f7e24ada6093a409461;p=civicrm-core.git diff --git a/api/v3/Batch.php b/api/v3/Batch.php index 8c5d69a2af..8e01355884 100644 --- a/api/v3/Batch.php +++ b/api/v3/Batch.php @@ -48,6 +48,20 @@ function civicrm_api3_batch_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } +/** + * Adjust Metadata for Create action + * + * The metadata is used for setting defaults, documentation & validation + * @param array $params array or parameters determined by getfields + */ +function _civicrm_api3_batch_create_spec(&$params) { + $params['entity_table']['api.default'] = "civicrm_batch"; + $params['modified_date']['api.default'] = "now"; + $params['status_id']['api.required'] = 1; + $params['title']['api.required'] = 1; + $params['status_id']['api.required'] = 1; +} + /** * Get a Batch *