+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param array $defaults (reference ) an assoc array to hold the flattened values
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
+ * @param array $defaults
+ * (reference ) an assoc array to hold the flattened values.
$optionGroup = new CRM_Core_DAO_OptionGroup();
$optionGroup->copyValues($params);
if ($optionGroup->find(TRUE)) {
$optionGroup = new CRM_Core_DAO_OptionGroup();
$optionGroup->copyValues($params);
if ($optionGroup->find(TRUE)) {
- * @param int $id id of the database record
- * @param boolean $is_active value we want to set the is_active field
+ * @param int $id
+ * Id of the database record.
+ * @param bool $is_active
+ * Value we want to set the is_active field.
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active);
}
/**
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active);
}
/**
- * @param array $params reference array contains the values submitted by the form
- * @param array $ids reference array contains the id
+ * @param array $params
+ * Reference array contains the values submitted by the form.
+ * @param array $ids
+ * Reference array contains the id.
- static function add(&$params, $ids = array()) {
- if(empty($params['id'])){
+ public static function add(&$params, $ids = array()) {
+ if (empty($params['id'])) {
// need to delete all option value field before deleting group
$optionValue = new CRM_Core_DAO_OptionValue();
$optionValue->option_group_id = $optionGroupId;
// need to delete all option value field before deleting group
$optionValue = new CRM_Core_DAO_OptionValue();
$optionValue->option_group_id = $optionGroupId;
$optionGroup = new CRM_Core_DAO_OptionGroup();
$optionGroup->id = $optionGroupId;
$optionGroup->find(TRUE);
return $optionGroup->name;
}
}
$optionGroup = new CRM_Core_DAO_OptionGroup();
$optionGroup->id = $optionGroupId;
$optionGroup->find(TRUE);
return $optionGroup->name;
}
}