MediaWiki fundraising/REL1_35
Gateway_Form Class Reference
Inheritance diagram for Gateway_Form:
Collaboration diagram for Gateway_Form:

Public Member Functions

 __construct ()
 Get these objects using "new" with no parameters.
 
 getForm ()
 Required method for returning the full HTML for a form.
 
 getResources ()
 
 getStyleModules ()
 All the things that need to be loaded in the head with link tags for styling server-rendered html.
 
 setGateway (GatewayType $gateway)
 
 setGatewayPage (GatewayPage $gatewayPage)
 

Protected Member Functions

 getNoCacheAction ()
 Determine the 'no cache' form action.
 
 sanitizePath ( $absolutePath)
 Given an absolute file path, returns path relative to extension base dir.
 

Protected Attributes

GatewayAdapter $gateway
 
GatewayPage $gatewayPage
 
string $scriptPath
 

Detailed Description

Definition at line 3 of file Form.php.

Constructor & Destructor Documentation

◆ __construct()

Gateway_Form::__construct ( )

Get these objects using "new" with no parameters.

Definition at line 36 of file Form.php.

Member Function Documentation

◆ getForm()

Gateway_Form::getForm ( )
abstract

Required method for returning the full HTML for a form.

Code invoking forms will expect this method to be set. Requiring only this method allows for flexible form generation inside of child classes while also providing a unified method for returning the full HTML for a form.

Returns
string The entire form HTML

Reimplemented in Gateway_Form_Mustache, and MustacheErrorForm.

◆ getNoCacheAction()

Gateway_Form::getNoCacheAction ( )
protected

Determine the 'no cache' form action.

This mostly exists to ensure that the form does not try to use AJAX to overwrite certain hidden form params that are normally overwritten for cached versions of the form.

Returns
string $url The full URL for the form to post to

Definition at line 56 of file Form.php.

References $title, wfAppendQuery(), wfCgiToArray(), and wfParseUrl().

Referenced by Gateway_Form_Mustache\getData().

◆ getResources()

Gateway_Form::getResources ( )

Reimplemented in Gateway_Form_Mustache, and MustacheErrorForm.

Definition at line 92 of file Form.php.

◆ getStyleModules()

Gateway_Form::getStyleModules ( )

All the things that need to be loaded in the head with link tags for styling server-rendered html.

Returns
array

Reimplemented in Gateway_Form_Mustache, and MustacheErrorForm.

Definition at line 102 of file Form.php.

◆ sanitizePath()

Gateway_Form::sanitizePath ( $absolutePath)
protected

Given an absolute file path, returns path relative to extension base dir.

Parameters
string$absolutePath
Returns
string path relative to DonationInterface/

Definition at line 111 of file Form.php.

Referenced by Gateway_Form_Mustache\getData().

◆ setGateway()

Gateway_Form::setGateway ( GatewayType $gateway)

Reimplemented in Gateway_Form_Mustache.

Definition at line 39 of file Form.php.

References $gateway.

◆ setGatewayPage()

Gateway_Form::setGatewayPage ( GatewayPage $gatewayPage)

Definition at line 43 of file Form.php.

References $gatewayPage, and SpecialPage\getContext().

Member Data Documentation

◆ $gateway

GatewayAdapter Gateway_Form::$gateway
protected

Definition at line 8 of file Form.php.

Referenced by setGateway(), and Gateway_Form_Mustache\setGateway().

◆ $gatewayPage

GatewayPage Gateway_Form::$gatewayPage
protected

Definition at line 13 of file Form.php.

Referenced by setGatewayPage().

◆ $scriptPath

string Gateway_Form::$scriptPath
protected

Definition at line 20 of file Form.php.

Referenced by Gateway_Form_Mustache\getData().


The documentation for this class was generated from the following file: