class CRM_Event_Controller_Registration extends CRM_Core_Controller

Properties

protected string $_title The title associated with this controller. from CRM_Core_Controller
string $_key The key associated with this controller. from CRM_Core_Controller
protected object $_scope The name of the session scope where values are stored. from CRM_Core_Controller
protected object $_stateMachine The state machine associated with this controller. from CRM_Core_Controller
protected boolean $_embedded Is this object being embedded in another object. If so the display routine needs to not do any work. (The parent object takes care of the display) from CRM_Core_Controller
protected boolean $_skipRedirection After entire form execution complete, do we want to skip control redirection. from CRM_Core_Controller
boolean $_print Are we in print mode? if so we need to modify the display functionality to do a minimal display :) from CRM_Core_Controller
boolean $_generateQFKey Should we generate a qfKey, true by default from CRM_Core_Controller
string $_QFResponseType QF response type. from CRM_Core_Controller
static protected CRM_Core_Smarty $_template Cache the smarty template for efficiency reasons. from CRM_Core_Controller
static protected CRM_Core_Session $_session Cache the session for efficiency reasons. from CRM_Core_Controller
protected object $_parent The parent of this form if embedded. from CRM_Core_Controller
string; $_destination The destination if set will override the destination the code wants to send it to. from CRM_Core_Controller
string $_entryURL The entry url for a top level form or wizard. Typically the URL with a reset=1 used to redirect back to when we land into some session wierdness from CRM_Core_Controller

Methods

__construct(string $title = NULL, bool|int $action = CRM_Core_Action::NONE, bool $modal = TRUE)

Class constructor.

fini()

No description

mixed|string
key(string $name, bool $addSequence = FALSE, bool $ignoreKey = FALSE)

No description

mixed
run()

Process the request, overrides the default QFC run method This routine actually checks if the QFC is modal and if it is the first invalid page, if so it call the requested action if not, it calls the display action on the first invalid page avoids the issue of users hitting the back button and getting a broken page

bool
validate()

No description

addActions(string $uploadDirectory = NULL, array $uploadNames = NULL)

Helper function to add all the needed default actions.

getStateMachine()

Getter method for stateMachine.

setStateMachine(CRM_Core_StateMachine $stateMachine)

Setter method for stateMachine.

addPages(CRM_Core_StateMachine $stateMachine, const|int $action = CRM_Core_Action::NONE)

Add pages to the controller. Note that the controller does not really care the order in which the pages are added

string
getButtonName()

QFC does not provide native support to have different 'submit' buttons.

reset()

Destroy all the session state of the controller.

process()

Virtual function to do any processing of data.

set(string|array $name, mixed $value = NULL)

Store the variable with the value in the form scope.

mixed
get(string $name)

Get the variable from the form scope.

array
wizardHeader(string $currentPageName)

Create the header for the wizard from the list of pages.

addWizardStyle(array $wizard)

No description

assign(string $var, mixed $value = NULL)

Assign value to name in template.

assign_by_ref(string $var, mixed $value)

Assign value to name in template by reference.

append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)

Appends values to template variables.

array
get_template_vars(string $name = NULL)

Returns an array containing template variables.

setEmbedded(bool $embedded)

Setter for embedded.

bool
getEmbedded()

Getter for embedded.

setSkipRedirection(bool $skipRedirection)

Setter for skipRedirection.

bool
getSkipRedirection()

Getter for skipRedirection.

setWord(null $fileName = NULL)

No description

setExcel(null $fileName = NULL)

No description

setPrint(bool $print)

Setter for print.

bool
getPrint()

Getter for print.

string
getTemplateFile()

No description

addUploadAction($uploadDir, $uploadNames)

No description

setParent($parent)

No description

object
getParent()

No description

string
getDestination()

No description

setDestination(null $url = NULL, bool $setToReferer = FALSE)

No description

mixed
cancelAction()

No description

invalidKey()

Write a simple fatal error message.

invalidKeyCommon()

No description

invalidKeyRedirect()

Instead of outputting a fatal error message, we'll just redirect to the entryURL if present

Details

at line 44
__construct(string $title = NULL, bool|int $action = CRM_Core_Action::NONE, bool $modal = TRUE)

Class constructor.

Parameters

string $title Descriptive title of the controller.
bool|int $action
bool $modal Whether controller is modal.

in CRM_Core_Controller at line 277
fini()

in CRM_Core_Controller at line 293
mixed|string key(string $name, bool $addSequence = FALSE, bool $ignoreKey = FALSE)

Parameters

string $name
bool $addSequence
bool $ignoreKey

Return Value

mixed|string

in CRM_Core_Controller at line 333
mixed run()

Process the request, overrides the default QFC run method This routine actually checks if the QFC is modal and if it is the first invalid page, if so it call the requested action if not, it calls the display action on the first invalid page avoids the issue of users hitting the back button and getting a broken page

This run is basically a composition of the original run and the jump action

Return Value

mixed

in CRM_Core_Controller at line 357
bool validate()

Return Value

bool

in CRM_Core_Controller at line 384
addActions(string $uploadDirectory = NULL, array $uploadNames = NULL)

Helper function to add all the needed default actions.

Note that the framework redefines all of the default QFC actions.

Parameters

string $uploadDirectory to store all the uploaded files
array $uploadNames for the various upload buttons (note u can have more than 1 upload)

in CRM_Core_Controller at line 411
CRM_Core_StateMachine getStateMachine()

Getter method for stateMachine.

Return Value

CRM_Core_StateMachine

in CRM_Core_Controller at line 420
setStateMachine(CRM_Core_StateMachine $stateMachine)

Setter method for stateMachine.

Parameters

CRM_Core_StateMachine $stateMachine

in CRM_Core_Controller at line 432
addPages(CRM_Core_StateMachine $stateMachine, const|int $action = CRM_Core_Action::NONE)

Add pages to the controller. Note that the controller does not really care the order in which the pages are added

Parameters

CRM_Core_StateMachine $stateMachine
const|int $action the mode in which the state machine is operating typically this will be add/view/edit

in CRM_Core_Controller at line 481
string getButtonName()

QFC does not provide native support to have different 'submit' buttons.

We introduce this notion to QFC by using button specific data. Thus if we have two submit buttons, we could have one displayed as a button and the other as an image, both are of type 'submit'.

Return Value

string the name of the button that has been pressed by the user

in CRM_Core_Controller at line 489
reset()

Destroy all the session state of the controller.

in CRM_Core_Controller at line 502
process()

Virtual function to do any processing of data.

Sometimes it is useful for the controller to actually process data. This is typically used when we need the controller to figure out what pages are potentially involved in this wizard. (this is dynamic and can change based on the arguments

in CRM_Core_Controller at line 512
set(string|array $name, mixed $value = NULL)

Store the variable with the value in the form scope.

Parameters

string|array $name name of the variable or an assoc array of name/value pairs
mixed $value Value of the variable if string.

in CRM_Core_Controller at line 524
mixed get(string $name)

Get the variable from the form scope.

Parameters

string $name name of the variable.

Return Value

mixed

in CRM_Core_Controller at line 537
array wizardHeader(string $currentPageName)

Create the header for the wizard from the list of pages.

Store the created header in smarty

Parameters

string $currentPageName Name of the page being displayed.

Return Value

array

in CRM_Core_Controller at line 572
addWizardStyle(array $wizard)

Parameters

array $wizard

in CRM_Core_Controller at line 592
assign(string $var, mixed $value = NULL)

Assign value to name in template.

Parameters

string $var
mixed $value Value of variable.

in CRM_Core_Controller at line 603
assign_by_ref(string $var, mixed $value)

Assign value to name in template by reference.

Parameters

string $var
mixed $value (reference) value of variable.

in CRM_Core_Controller at line 615
append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)

Appends values to template variables.

Parameters

array|string $tpl_var the template variable name(s)
mixed $value The value to append.
bool $merge

in CRM_Core_Controller at line 626
array get_template_vars(string $name = NULL)

Returns an array containing template variables.

Parameters

string $name

Return Value

array

in CRM_Core_Controller at line 635
setEmbedded(bool $embedded)

Setter for embedded.

Parameters

bool $embedded

in CRM_Core_Controller at line 645
bool getEmbedded()

Getter for embedded.

Return Value

bool return the embedded value

in CRM_Core_Controller at line 654
setSkipRedirection(bool $skipRedirection)

Setter for skipRedirection.

Parameters

bool $skipRedirection

in CRM_Core_Controller at line 664
bool getSkipRedirection()

Getter for skipRedirection.

Return Value

bool return the skipRedirection value

in CRM_Core_Controller at line 671
setWord(null $fileName = NULL)

Parameters

null $fileName

in CRM_Core_Controller at line 685
setExcel(null $fileName = NULL)

Parameters

null $fileName

in CRM_Core_Controller at line 702
setPrint(bool $print)

Setter for print.

Parameters

bool $print

in CRM_Core_Controller at line 718
bool getPrint()

Getter for print.

Return Value

bool return the print value

in CRM_Core_Controller at line 725
string getTemplateFile()

Return Value

string

in CRM_Core_Controller at line 747
addUploadAction($uploadDir, $uploadNames)

Parameters

$uploadDir
$uploadNames

in CRM_Core_Controller at line 775
setParent($parent)

Parameters

$parent

in CRM_Core_Controller at line 782
object getParent()

Return Value

object

in CRM_Core_Controller at line 789
string getDestination()

Return Value

string

in CRM_Core_Controller at line 797
setDestination(null $url = NULL, bool $setToReferer = FALSE)

Parameters

null $url
bool $setToReferer

in CRM_Core_Controller at line 815
mixed cancelAction()

Return Value

mixed

at line 65
invalidKey()

Write a simple fatal error message.

Other controllers can decide to do something else and present the user a better message and/or redirect to the same page with a reset url

in CRM_Core_Controller at line 831
invalidKeyCommon()

in CRM_Core_Controller at line 840
invalidKeyRedirect()

Instead of outputting a fatal error message, we'll just redirect to the entryURL if present