Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Content\Hook;
4
5use ContentHandler;
6use MediaWiki\Parser\ParserOutput;
7use MediaWiki\Revision\RevisionRecord;
8use SearchEngine;
9use WikiPage;
10
11/**
12 * This is a hook handler interface, see docs/Hooks.md.
13 * Use the hook name "SearchDataForIndex" to register handlers implementing this interface.
14 *
15 * @stable to implement
16 * @ingroup Hooks
17 */
18interface SearchDataForIndex2Hook {
19
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.
23     *
24     * @since 1.40
25     *
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
33     */
34    public function onSearchDataForIndex2(
35        array &$fields,
36        ContentHandler $handler,
37        WikiPage $page,
38        ParserOutput $output,
39        SearchEngine $engine,
40        RevisionRecord $revision
41    );
42}