MediaWiki
master
ProtectAction.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Actions
;
22
30
class
ProtectAction
extends
FormlessAction
{
31
32
public
function
getName
() {
33
return
'protect'
;
34
}
35
36
public
function
onView
() {
37
return
null
;
38
}
39
40
public
function
show
() {
41
$this->
getArticle
()->protect();
42
}
43
44
public
function
doesWrites
() {
45
return
true
;
46
}
47
}
48
50
class_alias( ProtectAction::class,
'ProtectAction'
);
MediaWiki\Actions\Action\getArticle
getArticle()
Get a Article object.
Definition
Action.php:216
MediaWiki\Actions\FormlessAction
An action which just does something, without showing a form first.
Definition
FormlessAction.php:32
MediaWiki\Actions\ProtectAction
Handle page protection (action=protect)
Definition
ProtectAction.php:30
MediaWiki\Actions\ProtectAction\show
show()
Definition
ProtectAction.php:40
MediaWiki\Actions\ProtectAction\onView
onView()
Show something on GET request.
Definition
ProtectAction.php:36
MediaWiki\Actions\ProtectAction\doesWrites
doesWrites()
Indicates whether POST requests handled by this action require write access to the wiki.
Definition
ProtectAction.php:44
MediaWiki\Actions\ProtectAction\getName
getName()
Return the name of the action this object responds to.
Definition
ProtectAction.php:32
MediaWiki\Actions
Definition
Action.php:22
includes
actions
ProtectAction.php
Generated on Wed May 21 2025 12:22:33 for MediaWiki by
1.10.0