DebugSubscriber - Fix compatibility with XDebug 2/3
[civicrm-core.git] / CRM / Export / StateMachine / Standalone.php
CommitLineData
78b22ce9
CW
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
78b22ce9 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 |
78b22ce9
CW
9 +--------------------------------------------------------------------+
10 */
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
78b22ce9
CW
16 */
17class CRM_Export_StateMachine_Standalone extends CRM_Core_StateMachine {
18
19 /**
20 * Class constructor.
21 *
22 * @param object $controller
23 * @param \const|int $action
f95d7a08 24 * @param string $entity
78b22ce9 25 */
f95d7a08 26 public function __construct($controller, $action = CRM_Core_Action::NONE, $entity = 'Contact') {
78b22ce9
CW
27 parent::__construct($controller, $action);
28
f95d7a08 29 $entityMap = ['Contribution' => 'Contribute', 'Membership' => 'Member', 'Participant' => 'Event'];
30 $entity = $entityMap[$entity] ?? $entity;
be2fb01f 31 $this->_pages = [
f95d7a08 32 'CRM_' . $entity . '_Export_Form_Select' => NULL,
33 'CRM_' . $entity . '_Export_Form_Map' => NULL,
be2fb01f 34 ];
78b22ce9
CW
35
36 $this->addSequentialPages($this->_pages, $action);
37 }
38
39 /**
40 * @todo So far does nothing.
41 *
42 * @return string
43 */
44 public function getTaskFormName() {
45 return '';
46 }
47
48 /**
49 * @todo not sure if this is needed
50 */
51 public function shouldReset() {
52 return FALSE;
53 }
54
55}