Merge pull request #15982 from civicrm/5.20
[civicrm-core.git] / CRM / PCP / StateMachine / PCP.php
CommitLineData
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 * $Id$
17 *
18 */
19
20/**
21 * State machine for managing different states of the Import process.
22 *
23 */
24class CRM_PCP_StateMachine_PCP extends CRM_Core_StateMachine {
25
26 /**
fe482240 27 * Class constructor.
6a488035 28 *
77b97be7
EM
29 * @param object $controller
30 * @param \const|int $action
6a488035 31 *
77b97be7
EM
32 * @internal param \CRM_Contact_Import_Controller $object
33 * @return \CRM_PCP_StateMachine_PCP CRM_Contact_Import_StateMachine
6a488035 34 */
00be9182 35 public function __construct($controller, $action = CRM_Core_Action::NONE) {
6a488035
TO
36 parent::__construct($controller, $action);
37
38 $session = CRM_Core_Session::singleton();
39 $session->set('singleForm', FALSE);
40
be2fb01f 41 $this->_pages = [
6a488035
TO
42 'CRM_PCP_Form_PCPAccount' => NULL,
43 'CRM_PCP_Form_Campaign' => NULL,
be2fb01f 44 ];
6a488035
TO
45
46 $this->addSequentialPages($this->_pages, $action);
47 }
96025800 48
6a488035 49}