X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMembership.php;h=7804ee3818ad8688757693e63005221785b574c0;hb=af5c6758a26a9585cde11bd6fb4a99fcf6311661;hp=689f880ec4ce16ae51e83202bb66047df1e5cf81;hpb=2107ac892a73d171792b2349be354e7b93729024;p=civicrm-core.git diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 689f880ec4..7804ee3818 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -238,34 +238,6 @@ function civicrm_api3_membership_get($params) { return civicrm_api3_create_success($members, $params, 'Membership', 'get'); } -/** - * Perform api v2 custom behaviour. - * - * 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 - * is passed in as part of the reasonable expectation developers have that we will keep the api - * as stable as possible - * - * @param array $params - * Parameters passed into get function. - * @param int $membershipTypeId - * @param bool $activeOnly - * - * @return array - * result for calling function - */ -function _civicrm_api3_membership_get_customv2behaviour(&$params, $membershipTypeId, $activeOnly) { - // get the membership for the given contact ID - $membershipParams = ['contact_id' => $params['contact_id']]; - if ($membershipTypeId) { - $membershipParams['membership_type_id'] = $membershipTypeId; - } - $membershipValues = []; - CRM_Member_BAO_Membership::getValues($membershipParams, $membershipValues, $activeOnly); - return $membershipValues; -} - /** * Non-standard behaviour inherited from v2. *