From 87a2386c7d4d30904a5da8c4fbb70f49750c3e38 Mon Sep 17 00:00:00 2001 From: Eileen Date: Tue, 19 Nov 2013 14:20:24 +1300 Subject: [PATCH] Add Batch metadata --- api/v3/Batch.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 * -- 2.25.1