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 | 20 | */ |
7849225a | 21 | class CRM_Import_StateMachine extends CRM_Core_StateMachine { |
6a488035 TO |
22 | |
23 | /** | |
fe482240 | 24 | * Class constructor. |
6a488035 | 25 | * |
6c8f6e67 EM |
26 | * @param object $controller |
27 | * @param \const|int $action | |
6a488035 | 28 | */ |
00be9182 | 29 | public function __construct($controller, $action = CRM_Core_Action::NONE) { |
6a488035 TO |
30 | parent::__construct($controller, $action); |
31 | ||
7849225a | 32 | $classType = str_replace('_Controller', '', get_class($controller)); |
be2fb01f | 33 | $this->_pages = [ |
ac4410cd | 34 | $classType . '_Form_DataSource' => NULL, |
7849225a CW |
35 | $classType . '_Form_MapField' => NULL, |
36 | $classType . '_Form_Preview' => NULL, | |
37 | $classType . '_Form_Summary' => NULL, | |
be2fb01f | 38 | ]; |
6a488035 TO |
39 | |
40 | $this->addSequentialPages($this->_pages, $action); | |
41 | } | |
96025800 | 42 | |
6a488035 | 43 | } |