<?php
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | 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
*
* @return array
- * list of groups, given contact subsribed to
+ * 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
+ * @param array $params
* Array.
*
* @return array
- *
*/
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.
+ * Array of parameters determined by getfields.
*/
function _civicrm_api3_group_organization_create_spec(&$params) {
$params['organization_id']['api.required'] = 1;
}
/**
- * Deletes an existing Group Organization
+ * Deletes an existing Group Organization.
*
* This API is used for deleting a Group Organization
*
* With 'id' = ID of the Group Organization to be deleted.
*
* @return array
- * API Result
- * {@getfields GroupOrganization_delete}
- * @example GroupOrganizationDelete.php
- * @access public
+ * API Result
*/
function civicrm_api3_group_organization_delete($params) {