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\Search\Hook;
4
5use HtmlArmor;
6use MediaWiki\Specials\SpecialSearch;
7use MediaWiki\Title\Title;
8use SearchResult;
9
10/**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "ShowSearchHitTitle" to register handlers implementing this interface.
13 *
14 * @stable to implement
15 * @ingroup Hooks
16 */
17interface ShowSearchHitTitleHook {
18    /**
19     * Use this hook to customise display of search hit title/link.
20     *
21     * @since 1.35
22     *
23     * @param Title &$title Title to link to
24     * @param string|HtmlArmor|null &$titleSnippet Label for the link representing
25     *   the search result. Typically the article title.
26     * @param SearchResult $result
27     * @param array $terms Array of search terms extracted by SearchDatabase search engines
28     *   (may not be populated by other search engines)
29     * @param SpecialSearch $specialSearch
30     * @param string[] &$query Array of query string parameters for the link representing the search
31     *   result
32     * @param string[] &$attributes Array of title link attributes, can be modified by extension
33     * @return bool|void True or no return value to continue or false to abort
34     */
35    public function onShowSearchHitTitle( &$title, &$titleSnippet, $result, $terms,
36        $specialSearch, &$query, &$attributes
37    );
38}