Commit | Line | Data |
---|---|---|
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 | */ |
17 | ||
18 | /** | |
19 | * This class is used by the Search functionality. | |
20 | * | |
21 | * - the search controller is used for building/processing multiform | |
22 | * searches. | |
23 | * | |
24 | * Typically the first form will display the search criteria and it's results | |
25 | * | |
7fe37828 | 26 | * The second form is used to process search results with the associated actions |
6a488035 TO |
27 | * |
28 | */ | |
29 | class CRM_Contribute_Controller_Contribution extends CRM_Core_Controller { | |
30 | ||
31 | /** | |
7fe37828 EM |
32 | * Class constructor. |
33 | * | |
34 | * @param string $title | |
35 | * @param bool|int $action | |
36 | * @param bool $modal | |
6a488035 | 37 | */ |
00be9182 | 38 | public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { |
6a488035 TO |
39 | parent::__construct($title, $modal); |
40 | ||
41 | $this->_stateMachine = new CRM_Contribute_StateMachine_Contribution($this, $action); | |
42 | ||
43 | // create and instantiate the pages | |
44 | $this->addPages($this->_stateMachine, $action); | |
45 | ||
46 | // add all the actions | |
47 | $uploadNames = $this->get('uploadNames'); | |
48 | if (!empty($uploadNames)) { | |
49 | $config = CRM_Core_Config::singleton(); | |
50 | $this->addActions($config->customFileUploadDir, $uploadNames); | |
51 | } | |
52 | else { | |
53 | $this->addActions(); | |
54 | } | |
55 | } | |
3ab88a8c | 56 | |
00be9182 | 57 | public function invalidKey() { |
3ab88a8c DL |
58 | $this->invalidKeyRedirect(); |
59 | } | |
60 | ||
6a488035 | 61 | } |