Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-08-04-22-25-32
[civicrm-core.git] / CRM / Event / Cart / Controller / Checkout.php
1 <?php
2
3 /**
4 * Class CRM_Event_Cart_Controller_Checkout
5 */
6 class CRM_Event_Cart_Controller_Checkout extends CRM_Core_Controller {
7 /**
8 * @param null $title
9 * @param bool|int $action
10 * @param bool $modal
11 */
12 function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
13 parent::__construct($title, $modal);
14
15
16 $this->_stateMachine = new CRM_Event_Cart_StateMachine_Checkout($this, $action);
17 $this->addPages($this->_stateMachine, $action);
18 $config = CRM_Core_Config::singleton();
19
20 //changes for custom data type File
21 $uploadNames = $this->get('uploadNames');
22 if (is_array($uploadNames) && !empty($uploadNames)) {
23 $this->addActions($config->customFileUploadDir, $uploadNames);
24 }
25 else {
26 // add all the actions
27 $this->addActions();
28 }
29 }
30 }
31