本文整理汇总了PHP中CRM_Core_StateMachine类的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_StateMachine类的具体用法?PHP CRM_Core_StateMachine怎么用?PHP CRM_Core_StateMachine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CRM_Core_StateMachine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CRM_Contribute_StateMachine_ContributionPage
/**
* class constructor
*
* @param object CRM_Contribute_Controller_ContributionPage
* @param int $action
*
* @return object CRM_Contribute_StateMachine_ContributionPage
*/
function CRM_Contribute_StateMachine_ContributionPage($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$session =& CRM_Core_Session::singleton();
$session->set('singleForm', false);
$this->_pages = array('CRM_Contribute_Form_ContributionPage_Settings', 'CRM_Contribute_Form_ContributionPage_Amount', 'CRM_Contribute_Form_ContributionPage_ThankYou', 'CRM_Contribute_Form_ContributionPage_Custom', 'CRM_Contribute_Form_ContributionPage_Premium');
$this->addSequentialPages($this->_pages, $action);
}
示例2: CRM_Contribute_StateMachine_Search
/**
* class constructor
*/
function CRM_Contribute_StateMachine_Search($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$this->_pages = array();
$this->_pages[] = 'CRM_Contribute_Form_Search';
list($task, $result) = $this->taskName($controller, 'Search');
$this->_task = $task;
if (is_array($task)) {
foreach ($task as $t) {
$this->_pages[] = $t;
}
} else {
$this->_pages[] = $task;
}
$this->addSequentialPages($this->_pages, $action);
}
示例3: CRM_Contact_StateMachine_Search
/**
* class constructor
*/
function CRM_Contact_StateMachine_Search($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$this->_pages = array();
if ($action == CRM_CORE_ACTION_ADVANCED) {
$this->_pages[] = 'CRM_Contact_Form_Search_Advanced';
list($task, $result) = $this->taskName($controller, 'Advanced');
} else {
$this->_pages[] = 'CRM_Contact_Form_Search';
list($task, $result) = $this->taskName($controller, 'Search');
}
$this->_task = $task;
if (is_array($task)) {
foreach ($task as $t) {
$this->_pages[] = $t;
}
} else {
$this->_pages[] = $task;
}
if ($result) {
$this->_pages[] = 'CRM_Contact_Form_Task_Result';
}
$this->addSequentialPages($this->_pages, $action);
}
示例4: CRM_Group_StateMachine
/**
* class constructor
*/
function CRM_Group_StateMachine($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$this->_pages = array('CRM_Group_Form_Edit', 'CRM_Contact_Form_Search', 'CRM_Contact_Form_Task_AddToGroup', 'CRM_Contact_Form_Task_Result');
$this->addSequentialPages($this->_pages, $action);
}
示例5: CRM_Contribute_StateMachine_Contribution
/**
* class constructor
*
* @param object CRM_Import_Controller
* @param int $action
*
* @return object CRM_Import_StateMachine
*/
function CRM_Contribute_StateMachine_Contribution($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$this->_pages = array('CRM_Contribute_Form_Contribution_Main', 'CRM_Contribute_Form_Contribution_Confirm', 'CRM_Contribute_Form_Contribution_ThankYou');
$this->addSequentialPages($this->_pages, $action);
}
示例6: CRM_Mailing_StateMachine_Send
/**
* class constructor
*
* @param object CRM_Mailing_Controller
* @param int $action
*
* @return object CRM_Mailing_StateMachine
*/
function CRM_Mailing_StateMachine_Send($controller, $action = CRM_CORE_ACTION_NONE)
{
parent::CRM_Core_StateMachine($controller, $action);
$this->_pages = array('CRM_Mailing_Form_Name', 'CRM_Mailing_Form_Group', 'CRM_Mailing_Form_Upload', 'CRM_Mailing_Form_Test', 'CRM_Mailing_Form_Schedule');
$this->addSequentialPages($this->_pages, $action);
}
示例7: __construct
/**
* Class constructor.
*
* @param object $controller
* @param \const|int $action
*/
public function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$classType = str_replace('_Controller', '', get_class($controller));
$this->_pages = array($classType . '_Form_DataSource' => NULL, $classType . '_Form_MapField' => NULL, $classType . '_Form_Preview' => NULL, $classType . '_Form_Summary' => NULL);
$this->addSequentialPages($this->_pages, $action);
}
示例8: __construct
/**
* @param object $controller
* @param const|int $action
*/
public function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$cart = CRM_Event_Cart_BAO_Cart::find_or_create_for_current_session();
$cart->load_associations();
if ($cart->is_empty()) {
CRM_Core_Error::statusBounce(ts("You don't have any events in you cart. Please add some events."), CRM_Utils_System::url('civicrm/event'));
}
$pages = array();
$is_monetary = FALSE;
$is_conference = FALSE;
foreach ($cart->events_in_carts as $event_in_cart) {
if ($event_in_cart->event->is_monetary) {
$is_monetary = TRUE;
}
}
$pages["CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices"] = NULL;
foreach ($cart->events_in_carts as $event_in_cart) {
if ($event_in_cart->is_parent_event()) {
foreach ($event_in_cart->participants as $participant) {
$pages["CRM_Event_Cart_Form_Checkout_ConferenceEvents_{$event_in_cart->event_id}_{$participant->id}"] = array('className' => 'CRM_Event_Cart_Form_Checkout_ConferenceEvents', 'title' => "Select {$event_in_cart->event->title} Events For {$participant->email}");
}
}
}
$pages["CRM_Event_Cart_Form_Checkout_Payment"] = NULL;
$pages["CRM_Event_Cart_Form_Checkout_ThankYou"] = NULL;
$this->addSequentialPages($pages, $action);
}
示例9: __construct
/**
* Class constructor.
*
* @param object $controller
* @param \const|int $action
*/
public function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$this->_pages = array();
if ($action == CRM_Core_Action::ADVANCED) {
$this->_pages['CRM_Contact_Form_Search_Advanced'] = NULL;
list($task, $result) = $this->taskName($controller, 'Advanced');
} elseif ($action == CRM_Core_Action::PROFILE) {
$this->_pages['CRM_Contact_Form_Search_Builder'] = NULL;
list($task, $result) = $this->taskName($controller, 'Builder');
} elseif ($action == CRM_Core_Action::COPY) {
$this->_pages['CRM_Contact_Form_Search_Custom'] = NULL;
list($task, $result) = $this->taskName($controller, 'Custom');
} else {
$this->_pages['CRM_Contact_Form_Search_Basic'] = NULL;
list($task, $result) = $this->taskName($controller, 'Basic');
}
$this->_task = $task;
if (is_array($task)) {
foreach ($task as $t) {
$this->_pages[$t] = NULL;
}
} else {
$this->_pages[$task] = NULL;
}
if ($result) {
$this->_pages['CRM_Contact_Form_Task_Result'] = NULL;
}
$this->addSequentialPages($this->_pages, $action);
}
示例10: array
/**
* class constructor
*
* @param object CRM_Auction_Controller
* @param int $action
*
* @return object CRM_Import_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$session =& CRM_Core_Session::singleton();
$session->set('singleForm', false);
$this->_pages = array('CRM_Auction_Form_ItemAccount' => null, 'CRM_Auction_Form_Item' => null);
$this->addSequentialPages($this->_pages, $action);
}
示例11: __construct
/**
* Class constructor.
*
* @param object $controller
* @param \const|int $action
*
* @internal param \CRM_Contact_Import_Controller $object
* @return \CRM_PCP_StateMachine_PCP CRM_Contact_Import_StateMachine
*/
public function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$session = CRM_Core_Session::singleton();
$session->set('singleForm', FALSE);
$this->_pages = array('CRM_PCP_Form_PCPAccount' => NULL, 'CRM_PCP_Form_Campaign' => NULL);
$this->addSequentialPages($this->_pages, $action);
}
示例12: array
/**
* class constructor
*
* @param object CRM_Contribute_Controller_ContributionPage
* @param int $action
*
* @return object CRM_Contribute_StateMachine_ContributionPage
*/
function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$session = CRM_Core_Session::singleton();
$session->set('singleForm', FALSE);
$config = CRM_Core_Config::singleton();
$this->_pages = array('CRM_Contribute_Form_ContributionPage_Settings' => NULL, 'CRM_Contribute_Form_ContributionPage_Amount' => NULL, 'CRM_Member_Form_MembershipBlock' => NULL, 'CRM_Contribute_Form_ContributionPage_ThankYou' => NULL, 'CRM_Friend_Form_Contribute' => NULL, 'CRM_PCP_Form_Contribute' => NULL, 'CRM_Contribute_Form_ContributionPage_Custom' => NULL, 'CRM_Contribute_Form_ContributionPage_Premium' => NULL, 'CRM_Contribute_Form_ContributionPage_Widget' => NULL);
if (!in_array("CiviMember", $config->enableComponents)) {
unset($this->_pages['CRM_Member_Form_MembershipBlock']);
}
$this->addSequentialPages($this->_pages, $action);
}
示例13: array
/**
* class constructor
*
* @param object CRM_Mailing_Controller
* @param int $action
*
* @return object CRM_Mailing_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$this->_pages = array('CRM_Mailing_Form_Group' => null, 'CRM_Mailing_Form_Settings' => null, 'CRM_Mailing_Form_Upload' => null, 'CRM_Mailing_Form_Test' => null);
require_once 'CRM/Mailing/Info.php';
if (CRM_Mailing_Info::workflowEnabled()) {
if (CRM_Core_Permission::check('schedule mailings')) {
$this->_pages['CRM_Mailing_Form_Schedule'] = null;
}
} else {
$this->_pages['CRM_Mailing_Form_Schedule'] = null;
}
$this->addSequentialPages($this->_pages, $action);
}
示例14: __construct
/**
* Class constructor.
*
* @param object $controller
* @param \const|int $action
*
* @internal param \CRM_Contact_Import_Controller $object
* @return \CRM_PCP_StateMachine_PCP CRM_Contact_Import_StateMachine
*/
public function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$session = CRM_Core_Session::singleton();
$session->set('singleForm', FALSE);
$this->_pages = array('CRM_QuickDonate_Form_PCPAccount' => NULL, 'CRM_QuickDonate_Form_Campaign' => NULL);
//MV: skip pcpAccount for logged in user
$userID = $session->get('userID');
$controller->set('jumpForm', FALSE);
if ($userID) {
unset($this->_pages['CRM_QuickDonate_Form_PCPAccount']);
$controller->set('jumpForm', TRUE);
}
$this->addSequentialPages($this->_pages, $action);
}
示例15: array
/**
* class constructor
*
* @param object CRM_Mailing_Controller
* @param int $action
*
* @return object CRM_Mailing_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE)
{
parent::__construct($controller, $action);
$this->_pages = array('CRM_Mailing_Form_Group' => NULL, 'CRM_Mailing_Form_Settings' => NULL, 'CRM_Mailing_Form_Upload' => NULL, 'CRM_Mailing_Form_Test' => NULL);
if (CRM_Mailing_Info::workflowEnabled()) {
if (CRM_Core_Permission::check('schedule mailings')) {
$this->_pages['CRM_Mailing_Form_Schedule'] = NULL;
}
if (CRM_Core_Permission::check('approve mailings')) {
$this->_pages['CRM_Mailing_Form_Approve'] = NULL;
}
} else {
$this->_pages['CRM_Mailing_Form_Schedule'] = NULL;
}
$this->addSequentialPages($this->_pages, $action);
}