*
* FIXME This is a bare-minimum placeholder
*
- * @param array $ params input parameters
+ * @param $params
+ *
+ * @internal param $array $ params input parameters
*
* {@example OptionValueGet.php 0}
* @example OptionValueGet.php
*
* {@example OptionValueCreate.php}
*
+ * @param $params
+ *
* @return array of newly created option_value property values.
* {@getfields OptionValue_create}
* @access public
return civicrm_api3_option_value_create($params);
}
-/*
+/**
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
function _civicrm_api3_custom_search_create_spec(&$params) {
require_once 'api/v3/OptionValue.php';
_civicrm_api3_option_value_create_spec($params);
- $params['weight']['api.default'] = 'next';
+ $params['option_group_id']['api.default'] = CRM_Core_DAO::getFieldValue(
+ 'CRM_Core_DAO_OptionGroup', 'custom_search', 'id', 'name'
+ );
$params['name']['api.aliases'] = array('class_name');
}