Manual:Hooks/CirrusSearchBuildDocumentLinks

From MediaWiki.org
Jump to navigation Jump to search
CirrusSearchBuildDocumentLinks
Available from version 1.23.0
Allows extensions to process incoming and outgoing links for the document
Define function:
public static function onCirrusSearchBuildDocumentLinks( \Elastica\Document $doc, Title $title, \CirrusSearch\Connection ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"CirrusSearchBuildDocumentLinks": "MyExtensionHooks::onCirrusSearchBuildDocumentLinks"
	}
}

For MediaWiki ≤1.25:

$wgHooks['CirrusSearchBuildDocumentLinks'][] = 'MyExtensionHooks::onCirrusSearchBuildDocumentLinks';
Called from:File(s): Updater.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:CirrusSearchBuildDocumentLinks extensions.

This hook is a part of CirrusSearch extension .

Details[edit]

  • $doc - \Elastica\Document object representing the page. Extensions can add links to it.
  • $title - Title object for the page being parsed.
  • $connection - \CirrusSearch\Connection object representing connection to ElasticSearch server.

See also[edit]