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