MediaWiki  REL1_24
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 10 of file HTMLButtonField.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 13 of file HTMLButtonField.php.


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 18 of file HTMLButtonField.php.

References $value, array(), HTMLFormField\getAttributes(), and Html\input().

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 27 of file HTMLButtonField.php.

HTMLButtonField::validate ( value,
alldata 
)

Button cannot be invalid.

Parameters:
string$value
array$alldata
Returns:
bool

Reimplemented from HTMLFormField.

Definition at line 39 of file HTMLButtonField.php.


Member Data Documentation

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

Reimplemented in HTMLSubmitField.

Definition at line 11 of file HTMLButtonField.php.


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