MediaWiki  REL1_22
HTMLButtonField Class Reference

Adds a generic button inline to the form. More...

Inheritance diagram for HTMLButtonField:
Collaboration diagram for HTMLButtonField:

List of all members.

Public Member Functions

 __construct ($info)
 Initialise the object.
 getInputHTML ($value)
 This function must be implemented to return the HTML to generate the input object itself.
 validate ($value, $alldata)
 Button cannot be invalid.

Protected Member Functions

 needsLabel ()
 Should this field have a label, or is there no input element with the appropriate id for the label to point to?

Protected Attributes

 $buttonType = 'button'

Detailed Description

Adds a generic button inline to the form.

Does not do anything, you must add click handling code in JavaScript. Use a HTMLSubmitField if you merely wish to add a submit button to a form.

Since:
1.22

Definition at line 2840 of file HTMLForm.php.


Constructor & Destructor Documentation

Initialise the object.

Parameters:
array$paramsAssociative Array. See HTMLForm doc for syntax.
Since:
1.22 The 'label' attribute no longer accepts raw HTML, use 'label-raw' instead
Exceptions:
MWException

Reimplemented from HTMLFormField.

Definition at line 2843 of file HTMLForm.php.

Referenced by getInputHTML().


Member Function Documentation

This function must be implemented to return the HTML to generate the input object itself.

It should not implement the surrounding table cells/rows, or labels/help messages.

Parameters:
string$valuethe value to set the input to; eg a default text for a text input.
Returns:
String valid HTML.

Reimplemented from HTMLFormField.

Definition at line 2848 of file HTMLForm.php.

References __construct().

HTMLButtonField::needsLabel ( ) [protected]

Should this field have a label, or is there no input element with the appropriate id for the label to point to?

Returns:
bool True to output a label, false to suppress

Reimplemented from HTMLFormField.

Definition at line 2866 of file HTMLForm.php.

HTMLButtonField::validate ( value,
alldata 
)

Button cannot be invalid.

Parameters:
$valueString
$alldataArray
Returns:
Bool

Reimplemented from HTMLFormField.

Definition at line 2876 of file HTMLForm.php.


Member Data Documentation

HTMLButtonField::$buttonType = 'button' [protected]

Reimplemented in HTMLSubmitField.

Definition at line 2841 of file HTMLForm.php.


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