MediaWiki 1.42.0
|
Handle page deletion. More...
Inherits FormAction.
Inherited by MediaWiki\Actions\FileDeleteAction.
Public Member Functions | |||||||
__construct (Article $article, IContextSource $context) | |||||||
Only public since 1.21.
| |||||||
getName () | |||||||
Return the name of the action this object responds to. | |||||||
getRestriction () | |||||||
Get the permission required to perform this action. | |||||||
onSubmit ( $data) | |||||||
Process the form on POST submission. | |||||||
onSuccess () | |||||||
Do something exciting on successful processing of the form. | |||||||
show () | |||||||
The basic pattern for actions is to display some sort of HTMLForm UI, maybe with some stuff underneath (history etc); to do some processing on submission of that form (delete, protect, etc) and to do something exciting on 'success', be that display something new or redirect to somewhere. | |||||||
Public Member Functions inherited from FormAction | |||||||
doesWrites () | |||||||
Public Member Functions inherited from Action | |||||||
addHelpLink ( $to, $overrideBaseUrl=false) | |||||||
Adds help link with an icon via page indicators. | |||||||
getArticle () | |||||||
Get a Article object. | |||||||
getAuthority () | |||||||
Shortcut to get the Authority executing this instance. | |||||||
getContext () | |||||||
Get the IContextSource in use here. | |||||||
getLanguage () | |||||||
Shortcut to get the user Language being used for this instance. | |||||||
getOutput () | |||||||
Get the OutputPage being used for this instance. | |||||||
getRequest () | |||||||
Get the WebRequest being used for this instance. | |||||||
getSkin () | |||||||
Shortcut to get the Skin being used for this instance. | |||||||
getTitle () | |||||||
Shortcut to get the Title object from the page. | |||||||
getUser () | |||||||
Shortcut to get the User being used for this instance. | |||||||
getWikiPage () | |||||||
Get a WikiPage object. | |||||||
msg ( $key,... $params) | |||||||
Get a Message object with context set Parameters are the same as wfMessage() | |||||||
needsReadRights () | |||||||
Indicates whether this action requires read rights. | |||||||
requiresUnblock () | |||||||
Whether this action can still be executed by a blocked user. | |||||||
requiresWrite () | |||||||
Whether this action requires the wiki not to be locked. | |||||||
setHookContainer (HookContainer $hookContainer) | |||||||
Protected Member Functions | |
alterForm (HTMLForm $form) | |
Play with the HTMLForm if you need to more substantially. | |
getDefaultReason () | |
Default reason to be used for the deletion form. | |
getDeleteReason () | |
getFormAction () | |
getFormFields () | |
getFormMessages () | |
getFormMsg (string $field) | |
getPageTitle () | |
Returns the name that goes in the <h1> page title. | |
isSuppressionAllowed () | |
prepareOutputForForm () | |
showEditedWarning () | |
showEditReasonsLinks () | |
showFormWarnings () | |
showLogEntries () | |
Show deletion log fragments pertaining to the current page. | |
showSubpagesWarnings () | |
tempDelete () | |
usesOOUI () | |
Whether the form should use OOUI. | |
Protected Member Functions inherited from FormAction | |
getForm () | |
Get the HTMLForm to control behavior. | |
postText () | |
preText () | |
Add pre- or post-text to the form. | |
Protected Member Functions inherited from Action | |
checkCanExecute (User $user) | |
Checks if the given user (identified by an object) can perform this action. | |
getDescription () | |
Returns the description that goes below the <h1> element. | |
getHookContainer () | |
getHookRunner () | |
setHeaders () | |
Set output headers for noindexing etc. | |
useTransactionalTimeLimit () | |
Call wfTransactionalTimeLimit() if this request was POSTed. | |
Protected Attributes | |
LinkRenderer | $linkRenderer |
ReadOnlyMode | $readOnlyMode |
UserOptionsLookup | $userOptionsLookup |
WatchlistManager | $watchlistManager |
const | MSG_COMMENT = 'comment' |
const | MSG_EDIT_REASONS = 'edit-reasons' |
const | MSG_EDIT_REASONS_SUPPRESS = 'edit-reasons-suppress' |
const | MSG_LEGEND = 'legend' |
const | MSG_REASON_DROPDOWN = 'reason-dropdown' |
Constants used to localize form fields. | |
const | MSG_REASON_DROPDOWN_OTHER = 'reason-dropdown-other' |
const | MSG_REASON_DROPDOWN_SUPPRESS = 'reason-dropdown-suppress' |
const | MSG_REASON_OTHER = 'reason-other' |
const | MSG_SUBMIT = 'submit' |
Protected Attributes inherited from Action | |
IContextSource null | $context |
IContextSource if specified; otherwise we'll use the Context from the Page. | |
array | $fields |
The fields used to create the HTMLForm. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Action | |
static | factory (string $action, Article $article, IContextSource $context=null) |
Get an appropriate Action subclass for the given action. | |
static | getActionName (IContextSource $context) |
Get the action that will be executed, not necessarily the one passed passed through the "action" request parameter. | |
Handle page deletion.
Definition at line 47 of file DeleteAction.php.
DeleteAction::__construct | ( | Article | $article, |
IContextSource | $context ) |
Only public since 1.21.
Article | $article | |
IContextSource | $context |
Reimplemented from Action.
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 78 of file DeleteAction.php.
|
protected |
Play with the HTMLForm if you need to more substantially.
HTMLForm | $form |
Reimplemented from FormAction.
Definition at line 119 of file DeleteAction.php.
References getFormAction(), getFormMsg(), and getTitle().
|
protected |
Default reason to be used for the deletion form.
Definition at line 605 of file DeleteAction.php.
|
protected |
|
protected |
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 596 of file DeleteAction.php.
Referenced by alterForm().
|
protected |
|
protected |
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 567 of file DeleteAction.php.
|
protected |
string | $field | One of the self::MSG_* constants |
Definition at line 585 of file DeleteAction.php.
Referenced by alterForm().
DeleteAction::getName | ( | ) |
Return the name of the action this object responds to.
Reimplemented from Action.
Definition at line 94 of file DeleteAction.php.
|
protected |
Returns the name that goes in the <h1>
page title.
Since 1.41, returning a string from this method has been deprecated.
Reimplemented from Action.
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 110 of file DeleteAction.php.
References getTitle(), and Action\msg().
DeleteAction::getRestriction | ( | ) |
Get the permission required to perform this action.
Often, but not always, the same as the action name
Implementations of this methods must always return the same value, regardless of parameters passed to the constructor or system state.
Reimplemented from Action.
Definition at line 115 of file DeleteAction.php.
|
protected |
Definition at line 431 of file DeleteAction.php.
DeleteAction::onSubmit | ( | $data | ) |
Process the form on POST submission.
If you don't want to do anything with the form, just return false here.
This method will be passed to the HTMLForm as a submit callback (see HTMLForm::setSubmitCallback) and must return as documented for HTMLForm::trySubmit.
array | $data |
Reimplemented from FormAction.
Definition at line 98 of file DeleteAction.php.
DeleteAction::onSuccess | ( | ) |
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 102 of file DeleteAction.php.
|
protected |
Definition at line 557 of file DeleteAction.php.
DeleteAction::show | ( | ) |
The basic pattern for actions is to display some sort of HTMLForm UI, maybe with some stuff underneath (history etc); to do some processing on submission of that form (delete, protect, etc) and to do something exciting on 'success', be that display something new or redirect to somewhere.
Some actions have more exotic behavior, but that's what subclassing is for :D
Reimplemented from FormAction.
Definition at line 130 of file DeleteAction.php.
References Action\addHelpLink(), Action\checkCanExecute(), getUser(), Action\setHeaders(), tempDelete(), and Action\useTransactionalTimeLimit().
|
protected |
Definition at line 284 of file DeleteAction.php.
Referenced by tempDelete().
|
protected |
Definition at line 406 of file DeleteAction.php.
References getTitle().
|
protected |
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 328 of file DeleteAction.php.
|
protected |
Show deletion log fragments pertaining to the current page.
Definition at line 550 of file DeleteAction.php.
Referenced by tempDelete().
|
protected |
Definition at line 345 of file DeleteAction.php.
|
protected |
Reimplemented in MediaWiki\Actions\FileDeleteAction.
Definition at line 141 of file DeleteAction.php.
References Action\$context, Action\getArticle(), MediaWiki\Context\IContextSource\getAuthority(), getContext(), getDeleteReason(), MediaWiki\Context\IContextSource\getLanguage(), MediaWiki\Context\IContextSource\getOutput(), MediaWiki\Context\IContextSource\getRequest(), getTitle(), MediaWiki\Context\IContextSource\getUser(), Action\getWikiPage(), Action\msg(), MessageLocalizer\msg(), showEditedWarning(), showLogEntries(), and wfEscapeWikiText().
Referenced by show().
|
protected |
Whether the form should use OOUI.
Reimplemented from FormAction.
Definition at line 106 of file DeleteAction.php.
|
protected |
Definition at line 63 of file DeleteAction.php.
|
protected |
Definition at line 65 of file DeleteAction.php.
|
protected |
Definition at line 66 of file DeleteAction.php.
|
protected |
Definition at line 62 of file DeleteAction.php.
|
protected |
Definition at line 55 of file DeleteAction.php.
|
protected |
Definition at line 59 of file DeleteAction.php.
|
protected |
Definition at line 60 of file DeleteAction.php.
|
protected |
Definition at line 58 of file DeleteAction.php.
|
protected |
Constants used to localize form fields.
Definition at line 52 of file DeleteAction.php.
|
protected |
Definition at line 54 of file DeleteAction.php.
|
protected |
Definition at line 53 of file DeleteAction.php.
|
protected |
Definition at line 56 of file DeleteAction.php.
|
protected |
Definition at line 57 of file DeleteAction.php.