32 $title = $result->getTitle();
33 $titleSnippet = $result->getTitleSnippet();
34 $snippet = $result->getTextSnippet( $terms );
36 if ( $titleSnippet ) {
37 $titleSnippet =
new HtmlArmor( $titleSnippet );
42 $link = $this->linkRenderer->makeLink( $title, $titleSnippet );
44 $redirectTitle = $result->getRedirectTitle();
46 if ( $redirectTitle !==
null ) {
47 $redirectText = $result->getRedirectSnippet();
49 if ( $redirectText ) {
50 $redirectText =
new HtmlArmor( $redirectText );
55 $redirect = Html::rawElement(
'span', [
'class' =>
'iw-result__redirect' ],
56 $this->specialSearch->msg(
'search-redirect' )->rawParams(
57 $this->linkRenderer->makeLink( $redirectTitle, $redirectText )
62 return Html::rawElement(
'div', [
'class' =>
'iw-result__title' ],
$link .
' ' . $redirect ) .
63 Html::rawElement(
'div', [
'class' =>
'iw-result__content' ], $snippet );