Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | ||
18 | /** | |
19 | * State machine for managing different states of the Import process. | |
6a488035 TO |
20 | */ |
21 | class CRM_Contribute_StateMachine_ContributionPage extends CRM_Core_StateMachine { | |
22 | ||
23 | /** | |
fe482240 | 24 | * Class constructor. |
6a488035 | 25 | * |
c490a46a CW |
26 | * @param CRM_Contribute_Controller_ContributionPage $controller |
27 | * @param const|int $action | |
6a488035 | 28 | * |
c490a46a | 29 | * @return CRM_Contribute_StateMachine_ContributionPage |
6a488035 | 30 | */ |
00be9182 | 31 | public function __construct($controller, $action = CRM_Core_Action::NONE) { |
6a488035 TO |
32 | parent::__construct($controller, $action); |
33 | ||
34 | $session = CRM_Core_Session::singleton(); | |
35 | $session->set('singleForm', FALSE); | |
36 | ||
be2fb01f | 37 | $this->_pages = [ |
6a488035 TO |
38 | 'CRM_Contribute_Form_ContributionPage_Settings' => NULL, |
39 | 'CRM_Contribute_Form_ContributionPage_Amount' => NULL, | |
40 | 'CRM_Member_Form_MembershipBlock' => NULL, | |
41 | 'CRM_Contribute_Form_ContributionPage_ThankYou' => NULL, | |
42 | 'CRM_Friend_Form_Contribute' => NULL, | |
43 | 'CRM_PCP_Form_Contribute' => NULL, | |
44 | 'CRM_Contribute_Form_ContributionPage_Custom' => NULL, | |
45 | 'CRM_Contribute_Form_ContributionPage_Premium' => NULL, | |
46 | 'CRM_Contribute_Form_ContributionPage_Widget' => NULL, | |
be2fb01f | 47 | ]; |
6a488035 | 48 | |
e46f73c7 | 49 | if (!CRM_Core_Component::isEnabled('CiviMember')) { |
6a488035 TO |
50 | unset($this->_pages['CRM_Member_Form_MembershipBlock']); |
51 | } | |
52 | ||
53 | $this->addSequentialPages($this->_pages, $action); | |
54 | } | |
96025800 | 55 | |
6a488035 | 56 | } |