CRM_Contribute_Controller_ContributionPage
class CRM_Contribute_Controller_ContributionPage extends CRM_Core_Controller
This class is used by the Search functionality.
- the search controller is used for building/processing multiform searches.
Typically the first form will display the search criteria and its results
The second form is used to process search results with the associated actions
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 bool | $_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 bool | $_skipRedirection | After entire form execution complete, do we want to skip control redirection. | from CRM_Core_Controller |
bool | $_print | Are we in print mode? if so we need to modify the display functionality to do a minimal display :) | from CRM_Core_Controller |
bool | $_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
Class constructor.
No description
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
Helper function to add all the needed default actions.
Add pages to the controller. Note that the controller does not really care the order in which the pages are added
QFC does not provide native support to have different 'submit' buttons.
Store the variable with the value in the form scope.
Create the header for the wizard from the list of pages.
Assign value to name in template by reference.
Appends values to template variables.
Returns an array containing template variables.
No description
Instead of outputting a fatal error message, we'll just redirect to the entryURL if present
Details
at line 53
__construct(string $title = NULL, bool|int $action = CRM_Core_Action::NONE, bool $modal = TRUE)
Class constructor.
in CRM_Core_Controller at line 279
fini()
in CRM_Core_Controller at line 293
mixed|string
key(string $name, bool $addSequence = FALSE, bool $ignoreKey = FALSE)
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
in CRM_Core_Controller at line 357
bool
validate()
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.
in CRM_Core_Controller at line 411
CRM_Core_StateMachine
getStateMachine()
Getter method for stateMachine.
in CRM_Core_Controller at line 420
setStateMachine(CRM_Core_StateMachine $stateMachine)
Setter method for 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
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'.
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.
in CRM_Core_Controller at line 524
mixed
get(string $name)
Get the variable from the form scope.
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
in CRM_Core_Controller at line 572
addWizardStyle(array $wizard)
in CRM_Core_Controller at line 592
assign(string $var, mixed $value = NULL)
Assign value to name in template.
in CRM_Core_Controller at line 603
assign_by_ref(string $var, mixed $value)
Assign value to name in template by reference.
in CRM_Core_Controller at line 615
append(array|string $tpl_var, mixed $value = NULL, bool $merge = FALSE)
Appends values to template variables.
in CRM_Core_Controller at line 626
array
get_template_vars(string $name = NULL)
Returns an array containing template variables.
in CRM_Core_Controller at line 635
setEmbedded(bool $embedded)
Setter for embedded.
in CRM_Core_Controller at line 645
bool
getEmbedded()
Getter for embedded.
in CRM_Core_Controller at line 654
setSkipRedirection(bool $skipRedirection)
Setter for skipRedirection.
in CRM_Core_Controller at line 664
bool
getSkipRedirection()
Getter for skipRedirection.
in CRM_Core_Controller at line 671
setWord(null $fileName = NULL)
in CRM_Core_Controller at line 685
setExcel(null $fileName = NULL)
in CRM_Core_Controller at line 702
setPrint(bool $print)
Setter for print.
in CRM_Core_Controller at line 718
bool
getPrint()
Getter for print.
in CRM_Core_Controller at line 725
string
getTemplateFile()
in CRM_Core_Controller at line 747
addUploadAction($uploadDir, $uploadNames)
in CRM_Core_Controller at line 775
setParent($parent)
in CRM_Core_Controller at line 782
object
getParent()
in CRM_Core_Controller at line 789
string
getDestination()
in CRM_Core_Controller at line 797
setDestination(null $url = NULL, bool $setToReferer = FALSE)
in CRM_Core_Controller at line 815
mixed
cancelAction()
in CRM_Core_Controller at line 827
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