X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FOptionGroup.php;h=883828e743a2ed3eda83d3c2a16cffd26276466e;hb=ff7da3a6508d0a7059c6527216920b2efb896b93;hp=0e2191f624799dafcd1ae2cb377b3802bdcdf85c;hpb=fa92b4af1c4abf280689cea6445c7a9b99858831;p=civicrm-core.git diff --git a/CRM/Core/BAO/OptionGroup.php b/CRM/Core/BAO/OptionGroup.php index 0e2191f624..883828e743 100644 --- a/CRM/Core/BAO/OptionGroup.php +++ b/CRM/Core/BAO/OptionGroup.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * @@ -44,11 +44,12 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { /** * Fetch object based on array of properties * - * @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. * - * @return CRM_Core_BAO_OptionGroup object - * @static + * @return CRM_Core_BAO_OptionGroup */ public static function retrieve(&$params, &$defaults) { $optionGroup = new CRM_Core_DAO_OptionGroup(); @@ -63,11 +64,13 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { /** * Update the is_active flag in the db * - * @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 Object DAO object on sucess, null otherwise - * @static + * @return Object + * DAO object on sucess, null otherwise */ public static function setIsActive($id, $is_active) { return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active); @@ -76,15 +79,16 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { /** * Add the Option Group * - * @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 * * @return object */ public static function add(&$params, $ids = array()) { - if(empty($params['id'])){ + if (empty($params['id'])) { $params['id'] = CRM_Utils_Array::value('optionGroup', $ids); } @@ -107,11 +111,8 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { /** * Delete Option Group * - * @param int $optionGroupId Id of the Option Group to be deleted. - * - * @return void - * - * @static + * @param int $optionGroupId + * Id of the Option Group to be deleted. */ public static function del($optionGroupId) { // need to delete all option value field before deleting group @@ -127,11 +128,11 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { /** * Get title of the option group * - * @param int $optionGroupId Id of the Option Group. + * @param int $optionGroupId + * Id of the Option Group. * - * @return String title - * - * @static + * @return string + * title */ public static function getTitle($optionGroupId) { $optionGroup = new CRM_Core_DAO_OptionGroup(); @@ -139,4 +140,5 @@ class CRM_Core_BAO_OptionGroup extends CRM_Core_DAO_OptionGroup { $optionGroup->find(TRUE); return $optionGroup->name; } + }