MediaWiki master
ProtectAction.php
Go to the documentation of this file.
1<?php
29
30 public function getName() {
31 return 'protect';
32 }
33
34 public function onView() {
35 return null;
36 }
37
38 public function show() {
39 $this->getArticle()->protect();
40 }
41
42 public function doesWrites() {
43 return true;
44 }
45}
getArticle()
Get a Article object.
Definition Action.php:204
An action which just does something, without showing a form first.
Handle page protection (action=protect)
doesWrites()
Indicates whether POST requests handled by this action require write access to the wiki.
getName()
Return the name of the action this object responds to.
onView()
Show something on GET request.