remove unused v2 function
[civicrm-core.git] / api / v3 / Membership.php
index 689f880ec4ce16ae51e83202bb66047df1e5cf81..7804ee3818ad8688757693e63005221785b574c0 100644 (file)
@@ -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.
  *