Merge pull request #18916 from colemanw/crudLink
[civicrm-core.git] / CRM / Group / StateMachine.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 class CRM_Group_StateMachine extends CRM_Core_StateMachine {
18
19 /**
20 * Class constructor.
21 *
22 * @param object $controller
23 * @param \const|int $action
24 */
25 public function __construct($controller, $action = CRM_Core_Action::NONE) {
26 parent::__construct($controller, $action);
27
28 $this->_pages = [
29 'CRM_Group_Form_Edit' => NULL,
30 'CRM_Contact_Form_Search_Basic' => NULL,
31 'CRM_Contact_Form_Task_AddToGroup' => NULL,
32 'CRM_Contact_Form_Task_Result' => NULL,
33 ];
34
35 $this->addSequentialPages($this->_pages, $action);
36 }
37
38 /**
39 * Return the form name of the task. This is
40 *
41 * @return string
42 */
43 public function getTaskFormName() {
44 return CRM_Utils_String::getClassName('CRM_Contact_Form_Task_AddToGroup');
45 }
46
47 }