Controller.php 2.33 KB
Newer Older
totten's avatar
totten committed
1 2 3
<?php
/*
 +--------------------------------------------------------------------+
totten's avatar
totten committed
4
 | CiviCRM version 5                                                  |
totten's avatar
totten committed
5
 +--------------------------------------------------------------------+
Seamus Lee's avatar
Seamus Lee committed
6
 | Copyright CiviCRM LLC (c) 2004-2019                                |
totten's avatar
totten committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License and the CiviCRM Licensing Exception along                  |
 | with this program; if not, contact CiviCRM LLC                     |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
26
 */
totten's avatar
totten committed
27 28 29 30

/**
 *
 * @package CRM
Seamus Lee's avatar
Seamus Lee committed
31
 * @copyright CiviCRM LLC (c) 2004-2019
totten's avatar
totten committed
32 33 34 35 36 37
 * $Id$
 *
 */
class CRM_Upgrade_Controller extends CRM_Core_Controller {

  /**
38
   * Class constructor.
Eileen McNaughton's avatar
Eileen McNaughton committed
39 40 41 42
   *
   * @param null $title
   * @param bool|int $action
   * @param bool $modal
totten's avatar
totten committed
43
   */
kurund's avatar
kurund committed
44
  public function __construct(
totten's avatar
totten committed
45
    $title = NULL,
totten's avatar
totten committed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    $action = CRM_Core_Action::NONE,
    $modal = TRUE
  ) {
    parent::__construct($title, $modal);

    $this->_stateMachine = new CRM_Upgrade_StateMachine($this,
      $this->getPages(),
      $action
    );

    // create and instantiate the pages
    $this->addPages($this->_stateMachine, $action);

    // add all the actions
    $config = CRM_Core_Config::singleton();
    $this->addActions();
  }
63

totten's avatar
totten committed
64
}