function __construct() {
parent::__construct();
}
+
/**
* Create option value - note that the create function calls 'add' but
- * has more business logic
- *
- * @param array $params input parameters
- */
+ * has more business logic
+ *
+ * @param array $params input parameters
+ *
+ * @return object
+ */
static function create($params) {
if (empty($params['id'])){
self::setDefaults($params);
$ids = array('optionValue' => $params['id']);
}
return CRM_Core_BAO_OptionValue::add($params, $ids);
- ;
}
/**
* Set default Parameters
$params['value'] = self::getDefaultValue($params);
}
}
+
/**
* Get next available value
* We will take the highest numeric value (or 0 if no numeric values exist)
* and add one. The calling function is responsible for any
* more complex decision making
+ *
* @param array $params
+ *
+ * @return int
*/
static function getDefaultWeight($params){
return (int) CRM_Utils_Weight::getDefaultWeight('CRM_Core_DAO_OptionValue',
* @access public
* @static
*
- * @return object
+ * @return CRM_Core_DAO_OptionValue
*/
static function add(&$params, &$ids) {
// CRM-10921: do not reset attributes to default if this is an update
/**
* Function to delete Option Value
*
- * @param int $optionGroupId Id of the Option Group to be deleted.
+ * @param $optionValueId
+ *
+ * @internal param int $optionGroupId Id of the Option Group to be deleted.
*
* @return boolean
*
* @param Integer $optionValueId the option value id.
* @param int $action the action describing whether prefix/suffix was UPDATED or DELETED
*
- * @return void
+ * @return bool
*/
static function updateRecords(&$optionValueId, $action) {
//finding group name
/**
* updates options values weights.
*
- * @param int $opGroupIde option group id.
- * @param array $opWeights options value , weight pair
+ * @param $opGroupId
+ * @param array $opWeights options value , weight pair
*
+ * @internal param int $opGroupIde option group id.
* @return void
* @access public
* @static