Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 | 2 | |
aa1b1481 | 3 | /** |
c490a46a | 4 | * @param array $params |
aa1b1481 EM |
5 | * |
6 | * @return array | |
7 | */ | |
6a488035 | 8 | function civicrm_api3_option_group_get($params) { |
6a488035 TO |
9 | return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); |
10 | } | |
11 | ||
12 | /** | |
13 | * create/update survey | |
14 | * | |
15 | * This API is used to create new survey or update any of the existing | |
16 | * In case of updating existing survey, id of that particular survey must | |
17 | * be in $params array. | |
18 | * | |
cf470720 TO |
19 | * @param array $params |
20 | * (reference) Associative array of property. | |
4033343a | 21 | * name/value pairs to insert in new 'survey' |
6a488035 | 22 | * |
a6c01b45 | 23 | * @return array |
72b3a70c | 24 | * survey array |
6a488035 | 25 | * |
6a488035 TO |
26 | */ |
27 | function civicrm_api3_option_group_create($params) { | |
4033343a | 28 | return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); |
6a488035 TO |
29 | } |
30 | ||
11e09c59 | 31 | /** |
6a488035 | 32 | * Adjust Metadata for Create action |
1c88e578 | 33 | * |
6a488035 | 34 | * The metadata is used for setting defaults, documentation & validation |
cf470720 TO |
35 | * @param array $params |
36 | * Array or parameters determined by getfields. | |
6a488035 TO |
37 | */ |
38 | function _civicrm_api3_option_group_create_spec(&$params) { | |
39 | $params['name']['api.unique'] = 1; | |
40 | } | |
4033343a | 41 | |
42 | /** | |
43 | * delete an existing Option Group | |
44 | * | |
45 | * This method is used to delete any existing Option Group. id of the group | |
46 | * to be deleted is required field in $params array | |
47 | * | |
cf470720 TO |
48 | * @param array $params |
49 | * Array containing id of the group. | |
4033343a | 50 | * to be deleted |
51 | * | |
a6c01b45 | 52 | * @return array |
72b3a70c | 53 | * API Result Array |
59f4c9ee | 54 | * {@getfields OptionGroup_delete} |
4033343a | 55 | */ |
56 | function civicrm_api3_option_group_delete($params) { | |
57 | return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); | |
58 | } |