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 * Define the reload action. Reload the page but do not do any validation.
14 * This help with actions where we might want hooks to process some data
15 * but not validate all the fields. Was incorporated to improve the discount
19 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 class CRM_Core_QuickForm_Action_Reload
extends CRM_Core_QuickForm_Action
{
26 * @param object $stateMachine
27 * Reference to state machine object.
29 * @return \CRM_Core_QuickForm_Action_Reload
31 public function __construct(&$stateMachine) {
32 parent
::__construct($stateMachine);
36 * Processes the request.
38 * @param CRM_Core_Form $page
39 * CRM_Core_Form the current form-page.
40 * @param string $actionName
41 * Current action name, as one Action object can serve multiple actions.
45 public function perform(&$page, $actionName) {
46 // save the form values and validation status to the session
47 $page->isFormBuilt() or $page->buildForm();
49 $pageName = $page->getAttribute('name');
50 $data = &$page->controller
->container();
51 $data['values'][$pageName] = $page->exportValues();
53 return $page->handle('display');