MediaWiki  REL1_22
PurgeAction Class Reference

User-requested page cache purging. More...

Inheritance diagram for PurgeAction:
Collaboration diagram for PurgeAction:

List of all members.

Public Member Functions

 getDescription ()
 Returns the description that goes below the <h1> tag.
 getName ()
 Return the name of the action this object responds to.
 onSubmit ($data)
 Process the form on POST submission.
 onSuccess ()
 Do something exciting on successful processing of the form.
 requiresUnblock ()
 Whether this action can still be executed by a blocked user.
 show ()
 purge is slightly weird because it can be either formed or formless depending on user permissions

Protected Member Functions

 alterForm (HTMLForm $form)
 Play with the HTMLForm if you need to more substantially.
 getFormFields ()
 Just get an empty form with a single submit button.
 postText ()
 preText ()
 Add pre- or post-text to the form.

Private Attributes

 $redirectParams

Detailed Description

User-requested page cache purging.

For users with 'purge', this will directly trigger the cache purging and for users without that right, it will show a confirmation form.

Definition at line 31 of file PurgeAction.php.


Member Function Documentation

PurgeAction::alterForm ( HTMLForm form) [protected]

Play with the HTMLForm if you need to more substantially.

Parameters:
$formHTMLForm

Reimplemented from FormAction.

Definition at line 86 of file PurgeAction.php.

References HTMLForm\setSubmitTextMsg().

Returns the description that goes below the <h1> tag.

Returns:
String

Reimplemented from Action.

Definition at line 43 of file PurgeAction.php.

PurgeAction::getFormFields ( ) [protected]

Just get an empty form with a single submit button.

Returns:
array

Reimplemented from FormAction.

Definition at line 51 of file PurgeAction.php.

References array().

Return the name of the action this object responds to.

Returns:
String lowercase

Reimplemented from Action.

Definition at line 35 of file PurgeAction.php.

PurgeAction::onSubmit ( data)

Process the form on POST submission.

If you return false from getFormFields(), this will obviously never be reached. If you don't want to do anything with the form, just return false here

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

Reimplemented from FormAction.

Definition at line 55 of file PurgeAction.php.

References page.

Referenced by show().

Do something exciting on successful processing of the form.

This might be to show a confirmation message (watch, rollback, etc) or to redirect somewhere else (edit, protect, etc).

Reimplemented from FormAction.

Definition at line 98 of file PurgeAction.php.

References Action\getOutput(), and Action\getTitle().

Referenced by show().

PurgeAction::postText ( ) [protected]
Returns:
string

Reimplemented from FormAction.

Definition at line 94 of file PurgeAction.php.

References Action\msg().

PurgeAction::preText ( ) [protected]

Add pre- or post-text to the form.

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

Reimplemented from FormAction.

Definition at line 90 of file PurgeAction.php.

References Action\msg().

Whether this action can still be executed by a blocked user.

Returns:
Bool

Reimplemented from Action.

Definition at line 39 of file PurgeAction.php.

purge is slightly weird because it can be either formed or formless depending on user permissions

Reimplemented from FormAction.

Definition at line 63 of file PurgeAction.php.

References $form, array(), Action\checkCanExecute(), FormAction\getForm(), Action\getRequest(), Action\getUser(), onSubmit(), onSuccess(), Action\setHeaders(), and wfArrayToCgi().


Member Data Documentation

PurgeAction::$redirectParams [private]

Definition at line 33 of file PurgeAction.php.


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