/** * * updates one or more option values * * @param params Array Associative array of property name/value pairs to insert in option. * @param option Object A valid custom field option object * * @return object of newly created custom_option. * * @access public * */ function crm_update_option_value($params, $option) { _crm_initialize(); if (!isset($option->id)) { return _crm_error("id of the custom option is not set."); } if (!is_array($params)) { return _crm_error("params is not of array type"); } $params['id'] = $option->id; require_once 'CRM/Core/BAO/CustomOption.php'; return CRM_Core_BAO_CustomOption::create($params); }