CRM_PCP_StateMachine_PCP
class CRM_PCP_StateMachine_PCP extends CRM_Core_StateMachine
State machine for managing different states of the Import process.
Properties
protected object | $_controller | The controller of this state machine. | from CRM_Core_StateMachine |
protected array | $_states | The list of states that belong to this state machine. | from CRM_Core_StateMachine |
protected array | $_pages | The list of pages that belong to this state machine. Note that a state and a form have a 1 <-> 1 relationship. so u can always derive one from the other | from CRM_Core_StateMachine |
protected array | $_pageNames | The names of the pages. | from CRM_Core_StateMachine |
protected int | $_action | The mode that the state machine is operating in. | from CRM_Core_StateMachine |
protected string | $_name | The display name for this machine. | from CRM_Core_StateMachine |
Methods
Class constructor.
Helper function to add a State to the state machine.
Return the state object corresponding to the name.
Should the controller reset the session In some cases, specifically search we want to remember state across various actions and want to go back to the beginning from the final state, but retain the same session values
Details
at line 51
CRM_Core_StateMachine
__construct(object $controller, const|int $action = CRM_Core_Action::NONE)
Class constructor.
in CRM_Core_StateMachine at line 105
string
getName()
Getter for name.
in CRM_Core_StateMachine at line 114
setName(string $name)
Setter for name.
in CRM_Core_StateMachine at line 134
object
perform(CRM_Core_Form $page, string $actionName, string $type = 'Next')
Do a state transition jump.
Currently only supported types are Next and Back. The other actions (Cancel, Done, Submit etc) do not need the state machine to figure out where to go
in CRM_Core_StateMachine at line 183
addState(string $name, int $type, object $prev, object $next)
Helper function to add a State to the state machine.
in CRM_Core_StateMachine at line 196
object
find(string $name)
Given a name find the corresponding state.
in CRM_Core_StateMachine at line 211
array
getStates()
Return the list of state objects.
in CRM_Core_StateMachine at line 224
CRM_Core_State
getState(string $name)
Return the state object corresponding to the name.
in CRM_Core_StateMachine at line 249
array
getPages()
Return the list of form objects.
in CRM_Core_StateMachine at line 261
addSequentialPages(array $pages)
Add sequential pages.
Meta level function to create a simple wizard for a state machine that is completely sequential.
in CRM_Core_StateMachine at line 316
reset()
Reset the state machine.
in CRM_Core_StateMachine at line 325
int
getAction()
Getter for action.
in CRM_Core_StateMachine at line 335
setContent(string $content)
Setter for content.
in CRM_Core_StateMachine at line 344
string
getContent()
Getter for content.
in CRM_Core_StateMachine at line 351
mixed
getDestination()
in CRM_Core_StateMachine at line 358
mixed
getSkipRedirection()
in CRM_Core_StateMachine at line 365
mixed
fini()
in CRM_Core_StateMachine at line 372
mixed
cancelAction()
in CRM_Core_StateMachine at line 385
bool
shouldReset()
Should the controller reset the session In some cases, specifically search we want to remember state across various actions and want to go back to the beginning from the final state, but retain the same session values