<?php
-// $Id$
/*
+--------------------------------------------------------------------+
* @version $Id: MembershipContact.php 30171 2010-10-14 09:11:27Z mover $
*/
-/**
- * Files required for this package
- */
-
-require_once 'CRM/Utils/Rule.php';
-require_once 'CRM/Utils/Array.php';
-
/**
* Deletes an existing contact membership
*
}
-/*
+/**
* modify metadata
*/
function _civicrm_api3_membership_delete_spec(&$params) {
return civicrm_api3_create_success($membership, $params, 'membership', 'create', $membershipBAO);
}
-/*
+
+/**
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
return NULL;
}
-/*
+
+/**
* When we copied apiv3 from api v2 we brought across some custom behaviours - in the case of
* membership a complicated return array is constructed. The original
* behaviour made contact_id a required field. We still need to keep this for v3 when contact_id
*/
function _civicrm_api3_membership_get_customv2behaviour(&$params, $contactID, $membershipTypeId, $activeOnly ){
// get the membership for the given contact ID
- require_once 'CRM/Member/BAO/Membership.php';
$membershipParams = array( 'contact_id' => $contactID );
if ( $membershipTypeId ) {
$membershipParams['membership_type_id'] = $membershipTypeId;