Merge pull request #21646 from MegaphoneJon/core-2874
[civicrm-core.git] / CRM / Custom / Import / Controller.php
1 <?php
2
3 /**
4 * Class CRM_Custom_Import_Controller
5 */
6 class CRM_Custom_Import_Controller extends CRM_Core_Controller {
7
8 /**
9 * Class constructor.
10 *
11 * @param string $title
12 * @param bool|int $action
13 * @param bool $modal
14 */
15 public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
16 parent::__construct($title, $modal);
17
18 set_time_limit(0);
19
20 $this->_stateMachine = new CRM_Import_StateMachine($this, $action);
21
22 // create and instantiate the pages
23 $this->addPages($this->_stateMachine, $action);
24
25 // add all the actions
26 $config = CRM_Core_Config::singleton();
27 $this->addActions($config->uploadDir, ['uploadFile']);
28 }
29
30 }