Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 | 2 | |
aa1b1481 EM |
3 | /** |
4 | * @param $params | |
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 | * | |
4033343a | 19 | * @param array $params (reference) Associative array of property |
20 | * name/value pairs to insert in new 'survey' | |
6a488035 TO |
21 | * |
22 | * @return array survey array | |
23 | * | |
24 | * @access public | |
25 | */ | |
26 | function civicrm_api3_option_group_create($params) { | |
4033343a | 27 | return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); |
6a488035 TO |
28 | } |
29 | ||
11e09c59 | 30 | /** |
6a488035 | 31 | * Adjust Metadata for Create action |
1c88e578 | 32 | * |
6a488035 TO |
33 | * The metadata is used for setting defaults, documentation & validation |
34 | * @param array $params array or parameters determined by getfields | |
35 | */ | |
36 | function _civicrm_api3_option_group_create_spec(&$params) { | |
37 | $params['name']['api.unique'] = 1; | |
38 | } | |
4033343a | 39 | |
40 | /** | |
41 | * delete an existing Option Group | |
42 | * | |
43 | * This method is used to delete any existing Option Group. id of the group | |
44 | * to be deleted is required field in $params array | |
45 | * | |
c206647d | 46 | * @param array $params array containing id of the group |
4033343a | 47 | * to be deleted |
48 | * | |
c206647d | 49 | * @return array API Result Array |
4033343a | 50 | * message otherwise |
51 | * {@getfields OptionGroup_delete} | |
52 | * @access public | |
53 | */ | |
54 | function civicrm_api3_option_group_delete($params) { | |
55 | return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); | |
56 | } |