CRM_Event_StateMachine_Search
class CRM_Event_StateMachine_Search extends CRM_Core_StateMachine
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 |
protected string | $_task | The task that the wizard is currently processing. |
Methods
Class constructor.
Helper function to add a State to the state machine.
Return the state object corresponding to the name.
Since this is a state machine for search and we want to come back to the same state we dont want to issue a reset of the state session when we are done processing a task
Determine the form name based on the action. This allows us to avoid using conditional state machine, much more efficient and simpler
Return the form name of the task.
Details
at line 50
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()
at line 111
bool
shouldReset()
Since this is a state machine for search and we want to come back to the same state we dont want to issue a reset of the state session when we are done processing a task
at line 88
array
taskName(CRM_Core_Controller $controller, string $formName = 'Search')
Determine the form name based on the action. This allows us to avoid using conditional state machine, much more efficient and simpler
at line 103
string
getTaskFormName()
Return the form name of the task.