Manual:Hooks/AfterImportPage

From Linux Web Expert

Revision as of 03:59, 3 March 2021 by imported>Baris6161TURK
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AfterImportPage
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
When a page import is completed
<translate> Define function:</translate>
public static function onAfterImportPage( $title, $origTitle, $revCount, $sRevCount, $pageInfo ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"AfterImportPage": "MediaWiki\\Extension\\MyExtension\\Hooks::onAfterImportPage"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> import/WikiImporter.php
<translate> Interface:</translate> AfterImportPageHook.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:AfterImportPage extensions</tvar>.</translate>


Details

  • $title: Title under which the revisions were imported
  • $origTitle: Title provided by the XML file
  • $revCount: Number of revisions in the XML file
  • $sRevCount: Number of sucessfully imported revisions
  • $pageInfo: associative array of page information