예제 #1
0
 /**
  * class constructor
  */
 function CRM_Contribute_Controller_Contribution($title = null, $action = CRM_CORE_ACTION_NONE, $modal = true)
 {
     require_once 'CRM/Contribute/StateMachine/Contribution.php';
     parent::CRM_Core_Controller($title, $modal);
     $this->_stateMachine =& new CRM_Contribute_StateMachine_Contribution($this, $action);
     // create and instantiate the pages
     $this->addPages($this->_stateMachine, $action);
     // add all the actions
     $this->addActions();
 }
예제 #2
0
 /**
  * class constructor
  */
 function CRM_Import_Controller($title = null, $action = CRM_CORE_ACTION_NONE, $modal = true)
 {
     parent::CRM_Core_Controller($title, $modal);
     require_once 'CRM/Import/StateMachine.php';
     $this->_stateMachine =& new CRM_Import_StateMachine($this, $action);
     // create and instantiate the pages
     $this->addPages($this->_stateMachine, $action);
     // add all the actions
     $config =& CRM_Core_Config::singleton();
     $this->addActions($config->uploadDir, array('uploadFile'));
 }
예제 #3
0
 /**
  * class constructor
  */
 function CRM_Mailing_Controller_Send($title = null, $action = CRM_CORE_ACTION_NONE, $modal = true)
 {
     require_once 'CRM/Mailing/StateMachine/Send.php';
     parent::CRM_Core_Controller($title, $modal);
     $this->_stateMachine =& new CRM_Mailing_StateMachine_Send($this, $action);
     // create and instantiate the pages
     $this->addPages($this->_stateMachine, $action);
     // add all the actions
     $config =& CRM_Core_Config::singleton();
     $this->addActions($config->uploadDir, array('textFile', 'htmlFile'));
 }
예제 #4
0
 /**
  * class constructor
  */
 function CRM_Contact_Controller_Search($title = null, $action = CRM_CORE_ACTION_NONE, $modal = true)
 {
     require_once 'CRM/Contact/StateMachine/Search.php';
     parent::CRM_Core_Controller($title, $modal);
     $this->_stateMachine =& new CRM_Contact_StateMachine_Search($this, $action);
     // create and instantiate the pages
     $this->addPages($this->_stateMachine, $action);
     // add all the actions
     $config =& CRM_Core_Config::singleton();
     $this->addActions();
 }
예제 #5
0
 /**
  * class constructor
  */
 function CRM_Group_Controller($title = null, $action = CRM_CORE_ACTION_NONE, $modal = true)
 {
     parent::CRM_Core_Controller($title, $modal);
     require_once 'CRM/Group/StateMachine.php';
     $this->_stateMachine =& new CRM_Group_StateMachine($this, $action);
     // create and instantiate the pages
     $this->addPages($this->_stateMachine, $action);
     // hack for now, set Search to Basic mode
     $this->_pages['Search']->setAction(CRM_CORE_ACTION_BASIC);
     // add all the actions
     $config =& CRM_Core_Config::singleton();
     $this->addActions();
 }
예제 #6
0
 /**
  * constructor
  *
  * @param string path   the class Path of the form being implemented
  * @param string title  the descriptive name for the page
  * @param int    mode   the mode that the form will operate on
  *
  * @return object
  * @access public
  */
 function CRM_Core_Controller_Simple($path, $title, $mode, $imageUpload = false)
 {
     // by definition a single page is modal :). We use the form name as the scope for this controller
     parent::CRM_Core_Controller($title, true, $path);
     $this->_stateMachine =& new CRM_Core_StateMachine($this);
     $params = array($path);
     $this->_stateMachine->addSequentialPages($params, $mode);
     $this->addPages($this->_stateMachine, $mode);
     // always allow a single upload file with same name
     $config =& CRM_Core_Config::singleton();
     if ($imageUpload) {
         $this->addActions($config->imageUploadDir, array('uploadFile'));
     } else {
         $this->addActions($config->uploadDir, array('uploadFile'));
     }
 }