Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / SearchDataForIndex2Hook.php
blobf9fcd664c45b8d7f265e3ec40e8436ef2d1700c7
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Content\ContentHandler;
6 use MediaWiki\Parser\ParserOutput;
7 use MediaWiki\Revision\RevisionRecord;
8 use SearchEngine;
9 use WikiPage;
11 /**
12 * This is a hook handler interface, see docs/Hooks.md.
13 * Use the hook name "SearchDataForIndex" to register handlers implementing this interface.
15 * @stable to implement
16 * @ingroup Hooks
18 interface SearchDataForIndex2Hook {
20 /**
21 * Use this hook to add data to search document. Allows you to add any data to
22 * the field map used to index the document.
24 * @since 1.40
26 * @param array &$fields Array of name => value pairs for fields
27 * @param ContentHandler $handler ContentHandler for the content being indexed
28 * @param WikiPage $page WikiPage that is being indexed
29 * @param ParserOutput $output ParserOutput that is produced from the page
30 * @param SearchEngine $engine SearchEngine for which the indexing is intended
31 * @param RevisionRecord $revision RevisionRecord being indexed
32 * @return bool|void True or no return value to continue or false to abort
34 public function onSearchDataForIndex2(
35 array &$fields,
36 ContentHandler $handler,
37 WikiPage $page,
38 ParserOutput $output,
39 SearchEngine $engine,
40 RevisionRecord $revision