Manual:Hooks/ArticleProtectComplete
From Linux Web Expert
ArticleProtectComplete | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Occurs after the protect article request has been processed | |
<translate> Define function:</translate> | public static function onArticleProtectComplete( &$wikiPage, &$user, $limit, $reason ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ArticleProtectComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleProtectComplete"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> page/WikiPage.php |
<translate> Interface:</translate> | ArticleProtectCompleteHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ArticleProtectComplete extensions</tvar>.</translate>
Details
$wikiPage
: theWikiPage
object that was protected$user
: the user object who did the protection$limit
: array of page restrictions indexed by permission (e.g.["edit"=>"sysop", "move"=>"sysop"]
)$reason
: Reason for protect