Merge pull request #15326 from totten/master-headfoot-2
[civicrm-core.git] / CRM / Upgrade / Controller.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 * $Id$
17 *
18 */
19 class CRM_Upgrade_Controller extends CRM_Core_Controller {
20
21 /**
22 * Class constructor.
23 *
24 * @param null $title
25 * @param bool|int $action
26 * @param bool $modal
27 */
28 public function __construct(
29 $title = NULL,
30 $action = CRM_Core_Action::NONE,
31 $modal = TRUE
32 ) {
33 parent::__construct($title, $modal);
34
35 $this->_stateMachine = new CRM_Upgrade_StateMachine($this,
36 $this->getPages(),
37 $action
38 );
39
40 // create and instantiate the pages
41 $this->addPages($this->_stateMachine, $action);
42
43 // add all the actions
44 $config = CRM_Core_Config::singleton();
45 $this->addActions();
46 }
47
48 }