MediaWiki
REL1_24
|
Special page which uses an HTMLForm to handle processing. More...
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 behavior. | |
getFormFields () | |
Get an HTMLForm descriptor array. | |
getMessagePrefix () | |
Get message prefix for HTMLForm. | |
postText () | |
Add post-text to the form. | |
preText () | |
Add pre-text to the form. | |
setParameter ($par) | |
Maybe do something interesting with the subpage parameter. | |
Protected Attributes | |
string | $par = null |
The sub-page of the special page. |
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 31 of file FormSpecialPage.php.
FormSpecialPage::alterForm | ( | HTMLForm $ | form | ) | [protected] |
Play with the HTMLForm if you need to more substantially.
HTMLForm | $form |
Reimplemented in SpecialRedirect, SpecialChangePassword, SpecialResetTokens, SpecialChangeEmail, SpecialPasswordReset, SpecialBlock, SpecialPageLanguage, SpecialLockdb, and SpecialUnlockdb.
Definition at line 63 of file FormSpecialPage.php.
FormSpecialPage::checkExecutePermissions | ( | User $ | user | ) | [protected] |
Called from execute() to check if the given user can perform this action.
Failures here must throw subclasses of ErrorPageError.
User | $user |
UserBlockedError |
Reimplemented in SpecialChangeEmail, SpecialBlock, SpecialChangePassword, SpecialPasswordReset, SpecialLockdb, and SpecialUnlockdb.
Definition at line 162 of file FormSpecialPage.php.
FormSpecialPage::execute | ( | $ | par | ) |
Basic SpecialPage workflow: get a form, send it to the user; get some data back,.
string | $par | Subpage string if one was specified |
Reimplemented from SpecialPage.
Reimplemented in SpecialResetTokens, SpecialChangeEmail, and SpecialChangePassword.
Definition at line 134 of file FormSpecialPage.php.
FormSpecialPage::getForm | ( | ) | [protected] |
Get the HTMLForm to control behavior.
Definition at line 80 of file FormSpecialPage.php.
FormSpecialPage::getFormFields | ( | ) | [abstract, protected] |
Get an HTMLForm descriptor array.
Reimplemented in SpecialRedirect, SpecialBlock, SpecialResetTokens, SpecialChangePassword, SpecialChangeEmail, SpecialRandomInCategory, SpecialPasswordReset, SpecialLockdb, SpecialUnlockdb, and SpecialPageLanguage.
FormSpecialPage::getMessagePrefix | ( | ) | [protected] |
Get message prefix for HTMLForm.
Definition at line 72 of file FormSpecialPage.php.
FormSpecialPage::onSubmit | ( | array $ | data | ) | [abstract] |
Process the form on POST submission.
array | $data | |
HTMLForm | $form |
Reimplemented in SpecialBlock, SpecialRedirect, SpecialChangePassword, SpecialPasswordReset, SpecialResetTokens, SpecialChangeEmail, SpecialPageLanguage, SpecialRandomInCategory, SpecialLockdb, and SpecialUnlockdb.
Do something exciting on successful processing of the form, most likely to show a confirmation message.
Reimplemented in SpecialBlock, SpecialPasswordReset, SpecialRedirect, SpecialChangePassword, SpecialPageLanguage, SpecialChangeEmail, SpecialLockdb, SpecialUnlockdb, and SpecialResetTokens.
Definition at line 126 of file FormSpecialPage.php.
FormSpecialPage::postText | ( | ) | [protected] |
Add post-text to the form.
Reimplemented in SpecialBlock, and SpecialPageLanguage.
Definition at line 55 of file FormSpecialPage.php.
FormSpecialPage::preText | ( | ) | [protected] |
Add pre-text to the form.
Reimplemented in SpecialBlock, and SpecialPageLanguage.
Definition at line 47 of file FormSpecialPage.php.
Whether this action cannot be executed by a blocked user.
Reimplemented in SpecialChangePassword, SpecialChangeEmail, and SpecialRandomInCategory.
Definition at line 189 of file FormSpecialPage.php.
Whether this action requires the wiki not to be locked.
Reimplemented in SpecialRandomInCategory, SpecialLockdb, and SpecialUnlockdb.
Definition at line 181 of file FormSpecialPage.php.
FormSpecialPage::setParameter | ( | $ | par | ) | [protected] |
Maybe do something interesting with the subpage parameter.
string | $par |
Reimplemented in SpecialRandomInCategory, SpecialBlock, and SpecialRedirect.
Definition at line 151 of file FormSpecialPage.php.
string FormSpecialPage::$par = null [protected] |
The sub-page of the special page.
Definition at line 35 of file FormSpecialPage.php.
Referenced by SpecialChangePassword\execute(), SpecialResetTokens\execute(), and SpecialRandomInCategory\setParameter().