protected $_mode = NULL;
- protected $_mid = NULL;
-
protected $_selfService = FALSE;
/**
* Set variables up before form is built.
*/
public function preProcess() {
- $this->_mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
-
- $this->_crid = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE);
+ parent::preProcess();
if ($this->_crid) {
$this->_paymentProcessorObj = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_crid, 'recur', 'obj');
$this->_subscriptionDetails = CRM_Contribute_BAO_ContributionRecur::getSubscriptionDetails($this->_crid);
$this->assign('membershipType', CRM_Utils_Array::value($membershipTypeId, $membershipTypes));
}
- $this->_coid = CRM_Utils_Request::retrieve('coid', 'Integer', $this, FALSE);
if ($this->_coid) {
if (CRM_Contribute_BAO_Contribution::isSubscriptionCancelled($this->_coid)) {
CRM_Core_Error::fatal(ts('The recurring contribution looks to have been cancelled already.'));
*/
protected $_crid = NULL;
+ /**
+ * The recurring contribution id, used when editing the recurring contribution.
+ *
+ * For historical reasons this duplicates _crid & since the name is more meaningful
+ * we should probably deprecate $_crid.
+ *
+ * @var int
+ */
+ protected $contributionRecurID = NULL;
+
+ /**
+ * @var int Membership ID
+ */
+ protected $_mid = NULL;
+
/**
* Explicitly declare the entity api name.
*/
return 'create';
}
+ /**
+ * Set variables up before form is built.
+ */
+ public function preProcess() {
+ $this->_mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
+ $this->_crid = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE);
+ $this->contributionRecurID = $this->_crid;
+ $this->_coid = CRM_Utils_Request::retrieve('coid', 'Integer', $this, FALSE);
+ }
+
}
* Set variables up before form is built.
*/
public function preProcess() {
- $this->_mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
- $this->_crid = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE);
+ parent::preProcess();
if ($this->_crid) {
$this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_crid, 'recur', 'info');
$this->_paymentProcessor['object'] = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_crid, 'recur', 'obj');
}
}
- $this->_coid = CRM_Utils_Request::retrieve('coid', 'Integer', $this, FALSE);
if ($this->_coid) {
$this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_coid, 'contribute', 'info');
$this->_paymentProcessor['object'] = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_coid, 'contribute', 'obj');
*/
class CRM_Contribute_Form_UpdateSubscription extends CRM_Contribute_Form_ContributionRecur {
- /**
- * The recurring contribution id, used when editing the recurring contribution.
- *
- * @var int
- */
- protected $contributionRecurID = NULL;
-
protected $_subscriptionDetails = NULL;
protected $_selfService = FALSE;
*/
public function preProcess() {
+ parent::preProcess();
$this->setAction(CRM_Core_Action::UPDATE);
- $this->contributionRecurID = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE);
if ($this->contributionRecurID) {
try {
$this->_paymentProcessorObj = CRM_Financial_BAO_PaymentProcessor::getPaymentProcessorForRecurringContribution($this->contributionRecurID);
$this->_subscriptionDetails = CRM_Contribute_BAO_ContributionRecur::getSubscriptionDetails($this->contributionRecurID);
}
- $this->_coid = CRM_Utils_Request::retrieve('coid', 'Integer', $this, FALSE);
if ($this->_coid) {
$this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getProcessorForEntity($this->_coid, 'contribute', 'info');
// @todo test & replace with $this->_paymentProcessorObj = Civi\Payment\System::singleton()->getById($this->_paymentProcessor['id']);