version fixes
[civicrm-core.git] / api / v3 / GroupOrganization.php
index 5ea1dbde40b13f5e51cc119234304fe5135fff55..607ffe1286a00fbfa5dcf3fcf1eb5788d3d0aeb5 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 group contact functions
+ * This api exposes the relationships between organizations and CiviCRM groups.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Group
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: GroupContact.php 21624 2009-06-04 22:02:55Z mover $
- *
  */
 
 
 /**
- * This API will give list of the groups for particular contact
- * Particualr status can be sent in params array
- * If no status mentioned in params, by default 'added' will be used
- * to fetch the records
+ * Get group organization record/s.
  *
- * @param  array $params  name value pair of contact information
- * {@getfields GroupOrganization_get}
- * @example GroupOrganizationGet.php
+ * @param array $params
+ *   Name value pair of contact information.
  *
- * @return  array  list of groups, given contact subsribed to
+ * @return array
+ *   list of groups, given contact subscribed to
  */
 function civicrm_api3_group_organization_get($params) {
   return _civicrm_api3_basic_get('CRM_Contact_DAO_GroupOrganization', $params);
 }
 
 /**
- * @example GroupOrganizationCreate.php
- * {@getfields GroupOrganization_create}
+ * Create group organization record.
  *
- * @param $params array
+ * @param array $params
+ *   Array.
  *
  * @return array
- *
  */
 function civicrm_api3_group_organization_create($params) {
 
@@ -72,14 +62,16 @@ function civicrm_api3_group_organization_create($params) {
   }
 
   _civicrm_api3_object_to_array($groupOrgBAO, $values);
-  return civicrm_api3_create_success($values, $params, 'group_organization', 'get', $groupOrgBAO);
+  return civicrm_api3_create_success($values, $params, 'GroupOrganization', 'get', $groupOrgBAO);
 }
 
 /**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
  *
- * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_group_organization_create_spec(&$params) {
   $params['organization_id']['api.required'] = 1;
@@ -87,20 +79,18 @@ function _civicrm_api3_group_organization_create_spec(&$params) {
 }
 
 /**
- * Deletes an existing Group Organization
+ * Deletes an existing Group Organization.
  *
  * This API is used for deleting a Group Organization
  *
- * @param  array  $params  with 'id' = ID of the Group Organization to be deleted
+ * @param array $params
+ *   With 'id' = ID of the Group Organization to be deleted.
  *
- * @return array API Result
- * {@getfields GroupOrganization_delete}
- * @example GroupOrganizationDelete.php
- * @access public
+ * @return array
+ *   API Result
  */
 function civicrm_api3_group_organization_delete($params) {
 
   $result = CRM_Contact_BAO_GroupOrganization::deleteGroupOrganization($params['id']);
   return $result ? civicrm_api3_create_success('Deleted Group Organization successfully') : civicrm_api3_create_error('Could not delete Group Organization');
 }
-