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 | * $Id$ |
17 | * | |
18 | */ | |
19 | class CRM_Event_Controller_Registration extends CRM_Core_Controller { | |
20 | ||
21 | /** | |
7a9ab499 EM |
22 | * Class constructor. |
23 | * | |
24 | * @param null $title | |
25 | * @param bool|int $action | |
26 | * @param bool $modal | |
6a488035 | 27 | */ |
00be9182 | 28 | public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) { |
6a488035 TO |
29 | parent::__construct($title, $modal); |
30 | ||
31 | $this->_stateMachine = new CRM_Event_StateMachine_Registration($this, $action); | |
32 | ||
33 | // create and instantiate the pages | |
34 | $this->addPages($this->_stateMachine, $action); | |
35 | ||
36 | $config = CRM_Core_Config::singleton(); | |
37 | ||
38 | //changes for custom data type File | |
39 | $uploadNames = $this->get('uploadNames'); | |
40 | if (is_array($uploadNames) && !empty($uploadNames)) { | |
41 | $this->addActions($config->customFileUploadDir, $uploadNames); | |
42 | } | |
43 | else { | |
44 | // add all the actions | |
45 | $this->addActions(); | |
46 | } | |
47 | } | |
3ab88a8c | 48 | |
00be9182 | 49 | public function invalidKey() { |
3ab88a8c DL |
50 | $this->invalidKeyRedirect(); |
51 | } | |
52 | ||
6a488035 | 53 | } |