MediaWiki  REL1_19
FormSpecialPage Class Reference

Special page which uses an HTMLForm to handle processing. More...

Inheritance diagram for FormSpecialPage:
Collaboration diagram for FormSpecialPage:

List of all members.

Public Member Functions

 execute ($par)
 Basic SpecialPage workflow: get a form, send it to the user; get some data back,.
 onSubmit (array $data)
 Process the form on POST submission.
 onSuccess ()
 Do something exciting on successful processing of the form, most likely to show a confirmation message.
 requiresUnblock ()
 Whether this action cannot be executed by a blocked user.
 requiresWrite ()
 Whether this action requires the wiki not to be locked.

Protected Member Functions

 alterForm (HTMLForm $form)
 Play with the HTMLForm if you need to more substantially.
 checkExecutePermissions (User $user)
 Called from execute() to check if the given user can perform this action.
 getForm ()
 Get the HTMLForm to control behaviour.
 getFormFields ()
 Get an HTMLForm descriptor array.
 postText ()
 preText ()
 Add pre- or post-text to the form.
 setParameter ($par)
 Maybe do something interesting with the subpage parameter.

Detailed Description

Special page which uses an HTMLForm to handle processing.

This is mostly a clone of FormAction. More special pages should be built this way; maybe this could be a new structure for SpecialPages

Definition at line 797 of file SpecialPage.php.


Member Function Documentation

FormSpecialPage::alterForm ( HTMLForm form) [protected]

Play with the HTMLForm if you need to more substantially.

Parameters:
$formHTMLForm

Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.

Definition at line 816 of file SpecialPage.php.

Referenced by getForm().

Here is the caller graph for this function:

Called from execute() to check if the given user can perform this action.

Failures here must throw subclasses of ErrorPageError.

Parameters:
$userUser
Returns:
Bool true
Exceptions:
ErrorPageError

Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.

Definition at line 890 of file SpecialPage.php.

References SpecialPage\checkPermissions(), SpecialPage\checkReadOnly(), User\isBlocked(), requiresUnblock(), and requiresWrite().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Basic SpecialPage workflow: get a form, send it to the user; get some data back,.

Parameters:
$parString Subpage string if one was specified

Reimplemented from SpecialPage.

Definition at line 864 of file SpecialPage.php.

References checkExecutePermissions(), getForm(), SpecialPage\getUser(), onSuccess(), SpecialPage\setHeaders(), and setParameter().

Here is the call graph for this function:

FormSpecialPage::getForm ( ) [protected]

Get the HTMLForm to control behaviour.

Returns:
HTMLForm|null

Definition at line 822 of file SpecialPage.php.

References alterForm(), SpecialPage\getContext(), getFormFields(), SpecialPage\getName(), SpecialPage\getRequest(), SpecialPage\msg(), postText(), preText(), wfArrayToCGI(), and wfRunHooks().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

FormSpecialPage::getFormFields ( ) [abstract, protected]

Get an HTMLForm descriptor array.

Returns:
Array

Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.

Referenced by getForm().

Here is the caller graph for this function:

FormSpecialPage::onSubmit ( array $  data) [abstract]

Process the form on POST submission.

Parameters:
$dataArray
Returns:
Bool|Array true for success, false for didn't-try, array of errors on failure

Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.

Do something exciting on successful processing of the form, most likely to show a confirmation message.

Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.

Referenced by execute().

Here is the caller graph for this function:

FormSpecialPage::postText ( ) [protected]

Reimplemented in SpecialBlock.

Definition at line 810 of file SpecialPage.php.

Referenced by getForm().

Here is the caller graph for this function:

FormSpecialPage::preText ( ) [protected]

Add pre- or post-text to the form.

Returns:
String HTML which will be sent to $form->addPreText()

Reimplemented in SpecialBlock, and SpecialPasswordReset.

Definition at line 809 of file SpecialPage.php.

Referenced by getForm().

Here is the caller graph for this function:

Whether this action cannot be executed by a blocked user.

Returns:
Bool

Definition at line 917 of file SpecialPage.php.

Referenced by checkExecutePermissions().

Here is the caller graph for this function:

Whether this action requires the wiki not to be locked.

Returns:
Bool

Reimplemented in SpecialLockdb, and SpecialUnlockdb.

Definition at line 909 of file SpecialPage.php.

Referenced by checkExecutePermissions().

Here is the caller graph for this function:

FormSpecialPage::setParameter ( par) [protected]

Maybe do something interesting with the subpage parameter.

Parameters:
$parString

Reimplemented in SpecialBlock.

Definition at line 881 of file SpecialPage.php.

Referenced by execute().

Here is the caller graph for this function:


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