MediaWiki fundraising/REL1_35
MustacheErrorForm Class Reference

Renders error forms from Mustache templates. More...

Inheritance diagram for MustacheErrorForm:
Collaboration diagram for MustacheErrorForm:

Public Member Functions

 getForm ()
 Return the rendered HTML form, using template parameters from the gateway object.
 
 getResources ()
 Override the parent implementation to get rid of any payment-method-specific JavaScript.
 
 getStyleModules ()
 Override the parent implementation to get rid of any payment-method-specific CSS.
 
- Public Member Functions inherited from Gateway_Form_Mustache
 setGateway (GatewayType $gateway)
 
- Public Member Functions inherited from Gateway_Form
 __construct ()
 Get these objects using "new" with no parameters.
 
 setGatewayPage (GatewayPage $gatewayPage)
 

Protected Member Functions

 addMessageParameters (&$data)
 
 addRetryLink (&$data)
 
 getTopLevelTemplate ()
 
- Protected Member Functions inherited from Gateway_Form_Mustache
 addCurrencyData (&$data)
 
 addFormFields (&$data)
 
 addModules ( $key, &$modules, $newModules)
 
 addSubmethods (&$data)
 
 getData ()
 
 getErrors ()
 Get errors, sorted into two buckets - 'general' errors to display at the top of the form, and 'field' errors to display inline.
 
 getImagePath ( $name)
 
 getPartials (array $data)
 
 getSrcSet ( $submethod)
 
 getUrlsAndEmails ()
 
 handleOptIn (&$data)
 
 setStateOptions (&$data)
 
- Protected Member Functions inherited from Gateway_Form
 getNoCacheAction ()
 Determine the 'no cache' form action.
 
 sanitizePath ( $absolutePath)
 Given an absolute file path, returns path relative to extension base dir.
 

Additional Inherited Members

- Static Public Member Functions inherited from Gateway_Form_Mustache
static fieldError ( $fieldName)
 Render a validation error message or blank error placeholder.
 
static l10n ( $key,... $params)
 Get a message value specific to the donor's country and language.
 
- Public Attributes inherited from Gateway_Form_Mustache
const EXTENSION = '.html.mustache'
 
- Static Public Attributes inherited from Gateway_Form_Mustache
static string $baseDir
 
static string $country
 We set the following public static variables for use in mustache helper functions l10n and fieldError, which need to be static and are accessed via eval()'ed code from MustacheHelper.
 
static array[] $fieldErrors
 
static string[] $messageReplacements = []
 Keys are message keys used in templates, values are message keys to replace them with.
 
- Protected Attributes inherited from Gateway_Form
GatewayAdapter $gateway
 
GatewayPage $gatewayPage
 
string $scriptPath
 
- Static Protected Attributes inherited from Gateway_Form_Mustache
static string[] $partials
 

Detailed Description

Renders error forms from Mustache templates.

Definition at line 9 of file MustacheErrorForm.php.

Member Function Documentation

◆ addMessageParameters()

MustacheErrorForm::addMessageParameters ( & $data)
protected

Definition at line 46 of file MustacheErrorForm.php.

References Gateway_Form_Mustache\getUrlsAndEmails().

Referenced by getForm().

◆ addRetryLink()

MustacheErrorForm::addRetryLink ( & $data)
protected

Definition at line 34 of file MustacheErrorForm.php.

References DonationData\getRetryFields().

Referenced by getForm().

◆ getForm()

MustacheErrorForm::getForm ( )

Return the rendered HTML form, using template parameters from the gateway object.

Returns
string
Exceptions
RuntimeException

Reimplemented from Gateway_Form_Mustache.

Definition at line 17 of file MustacheErrorForm.php.

References Gateway_Form_Mustache\$baseDir, addMessageParameters(), addRetryLink(), Gateway_Form_Mustache\EXTENSION, and getTopLevelTemplate().

◆ getResources()

MustacheErrorForm::getResources ( )

Override the parent implementation to get rid of any payment-method-specific JavaScript.

Returns
array

Reimplemented from Gateway_Form_Mustache.

Definition at line 82 of file MustacheErrorForm.php.

◆ getStyleModules()

MustacheErrorForm::getStyleModules ( )

Override the parent implementation to get rid of any payment-method-specific CSS.

Returns
array

Reimplemented from Gateway_Form_Mustache.

Definition at line 74 of file MustacheErrorForm.php.

◆ getTopLevelTemplate()

MustacheErrorForm::getTopLevelTemplate ( )
protected

Reimplemented from Gateway_Form_Mustache.

Definition at line 66 of file MustacheErrorForm.php.

Referenced by getForm().


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