/**
* Set variables up before form is built.
+ *
+ * @throws \CRM_Contribute_Exception_InactiveContributionPageException
*/
- public function preProcess() {
+ public function preProcess(): void {
parent::preProcess();
$this->_params = $this->get('params');
$this->assign('useForMember', $this->get('useForMember'));
if (!empty($this->_values['honoree_profile_id']) && !empty($params['soft_credit_type_id'])) {
- $softCreditTypes = CRM_Core_OptionGroup::values("soft_credit_type", FALSE);
+ $softCreditTypes = CRM_Core_OptionGroup::values('soft_credit_type', FALSE);
$this->assign('soft_credit_type', $softCreditTypes[$params['soft_credit_type_id']]);
CRM_Contribute_BAO_ContributionSoft::formatHonoreeProfileFields($this, $params['honor']);
}
$this->_separateMembershipPayment = $this->get('separateMembershipPayment');
- $this->assign("is_separate_payment", $this->_separateMembershipPayment);
+ $this->assign('is_separate_payment', $this->_separateMembershipPayment);
if (empty($this->_ccid)) {
$this->buildCustom($this->_values['custom_pre_id'], 'customPre', TRUE);
$defaults = [];
$fields = [];
foreach ($this->_fields as $name => $dontCare) {
- if ($name != 'onbehalf' || $name != 'honor') {
+ if ($name !== 'onbehalf' || $name !== 'honor') {
$fields[$name] = 1;
}
}
}
$membershipTypeValues = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, $membershipTypeIds);
- $this->_membershipTypeValues = $membershipTypeValues;
$endDate = NULL;
// Check if we support auto-renew on this contribution page