wiki.techinc.nl/includes/widget/search/SearchResultWidget.php
Erik Bernhardson a0936780bb Extract main search result rendering from SpecialSearch
Has a pre-existing problem related to the link offset of secondary
inline results. Specifically the offset of secondary inline starts
at the provided offset, even though there may be primary results
displayed above it.

Bug: T150390
Change-Id: Id1d6b357f45a2cf615d9412cc95dd597c724e8b6
2017-01-17 15:57:40 -08:00

18 lines
461 B
PHP

<?php
namespace MediaWiki\Widget\Search;
use SearchResult;
/**
* Renders a single search result to HTML
*/
interface SearchResultWidget {
/**
* @param SearchResult $result The result to render
* @param string $terms Terms to be highlighted (@see SearchResult::getTextSnippet)
* @param int $position The zero indexed result position, including offset
* @return string HTML
*/
public function render( SearchResult $result, $terms, $position );
}