3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
13 * Redefine the cancel action
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
18 class CRM_Core_QuickForm_Action_Cancel
extends CRM_Core_QuickForm_Action
{
23 * @param object $stateMachine
24 * Reference to state machine object.
26 * @return \CRM_Core_QuickForm_Action_Cancel
28 public function __construct(&$stateMachine) {
29 parent
::__construct($stateMachine);
33 * Processes the request.
35 * @param CRM_Core_Form $page
36 * CRM_Core_Form the current form-page.
37 * @param string $actionName
38 * Current action name, as one Action object can serve multiple actions.
40 public function perform(&$page, $actionName) {
41 // conditional actions if cancelAction is defined
42 $this->_stateMachine
->cancelAction();
44 $this->popUserContext();