*/
public function processMembership($membershipParams, $contactID, $customFieldsFormatted, $fieldTypes, $premiumParams, $membershipLineItems) {
try {
- $membershipTypeID = (array) $membershipParams['selectMembership'];
-
- $membershipTypes = CRM_Member_BAO_Membership::buildMembershipTypeValues($this);
-
+ $membershipTypeIDs = (array) $membershipParams['selectMembership'];
+ $membershipTypes = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, $membershipTypeIDs);
$membershipType = empty($membershipTypes) ? array() : reset($membershipTypes);
$this->assign('membership_name', CRM_Utils_Array::value('name', $membershipType));
}
CRM_Member_BAO_Membership::postProcessMembership($membershipParams, $contactID,
- $this, $premiumParams, $customFieldsFormatted, $fieldTypes, $membershipType, $membershipTypeID, $isPaidMembership, $this->_membershipId, $isProcessSeparateMembershipTransaction, $contributionTypeId,
+ $this, $premiumParams, $customFieldsFormatted, $fieldTypes, $membershipType, $membershipTypeIDs, $isPaidMembership, $this->_membershipId, $isProcessSeparateMembershipTransaction, $contributionTypeId,
$membershipLineItems
);
$this->assign('membership_assign', TRUE);
*
* @param array $membershipDetails
*
- * @param array $membershipTypeID
+ * @param array $membershipTypeIDs
*
* @param bool $isPaidMembership
- * @param integer $membershipID
+ * @param array $membershipID
*
* @param $isProcessSeparateMembershipTransaction
*
* @access public
*/
public static function postProcessMembership($membershipParams, $contactID, &$form, $premiumParams,
- $customFieldsFormatted = NULL, $includeFieldTypes = NULL, $membershipDetails, $membershipTypeID, $isPaidMembership, $membershipID,
+ $customFieldsFormatted = NULL, $includeFieldTypes = NULL, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
$isProcessSeparateMembershipTransaction, $defaultContributionTypeID, $membershipLineItems) {
$result = $membershipContribution = NULL;
$isTest = CRM_Utils_Array::value('is_test', $membershipParams, FALSE);
$form->_params['campaign_id'] = $membershipParams['onbehalf']['member_campaign_id'];
}
//@todo it should no longer be possible for it to get to this point & membership to not be an array
- if (is_array($membershipTypeID)) {
+ if (is_array($membershipTypeIDs)) {
$typesTerms = CRM_Utils_Array::value('types_terms', $membershipParams, array());
- foreach ($membershipTypeID as $memType) {
+ foreach ($membershipTypeIDs as $memType) {
$numTerms = CRM_Utils_Array::value($memType, $typesTerms, 1);
$createdMemberships[$memType] = self::createOrRenewMembership($membershipParams, $contactID, $customFieldsFormatted, $membershipID, $memType, $isTest, $numTerms, $membershipContribution, $form);
}
*
* @param $contactID
* @param CRM_Contribute_Form_Contribution_Confirm $form
- * @param $membershipDetails
* @param $tempParams
* @param $isTest
*
+ * @param $lineItems
+ * @param $minimumFee
+ * @param $financialTypeID
+ *
* @throws CRM_Core_Exception
+ * @throws Exception
+ * @internal param $membershipDetails
* @return CRM_Contribute_BAO_Contribution
*/
public static function processSecondaryFinancialTransaction($contactID, &$form, $tempParams, $isTest, $lineItems, $minimumFee, $financialTypeID) {