32 $title = $result->getTitle();
33 $iwPrefix = $result->getTitle()->getInterwiki();
34 $titleSnippet = $result->getTitleSnippet();
35 $snippet = $result->getTextSnippet( $terms );
37 if ( $titleSnippet ) {
38 $titleSnippet =
new HtmlArmor( $titleSnippet );
43 $link = $this->linkRenderer->makeLink( $title, $titleSnippet );
45 $redirectTitle = $result->getRedirectTitle();
47 if ( $redirectTitle !==
null ) {
48 $redirectText = $result->getRedirectSnippet();
50 if ( $redirectText ) {
51 $redirectText =
new HtmlArmor( $redirectText );
56 $redirect = Html::rawElement(
'span', [
'class' =>
'iw-result__redirect' ],
57 $this->specialSearch->msg(
'search-redirect' )->rawParams(
58 $this->linkRenderer->makeLink( $redirectTitle, $redirectText )
63 return Html::rawElement(
'div', [
'class' =>
'iw-result__title' ],
$link .
' ' . $redirect ) .
64 Html::rawElement(
'div', [
'class' =>
'iw-result__content' ], $snippet );