31 $title = $result->getTitle();
32 $titleSnippet = $result->getTitleSnippet();
33 $snippet = $result->getTextSnippet();
35 if ( $titleSnippet ) {
36 $titleSnippet =
new HtmlArmor( $titleSnippet );
41 $link = $this->linkRenderer->makeLink(
$title, $titleSnippet );
43 $redirectTitle = $result->getRedirectTitle();
45 if ( $redirectTitle !==
null ) {
46 $redirectText = $result->getRedirectSnippet();
48 if ( $redirectText ) {
49 $redirectText =
new HtmlArmor( $redirectText );
54 $redirect = Html::rawElement(
'span', [
'class' =>
'iw-result__redirect' ],
55 $this->specialSearch->msg(
'search-redirect' )->rawParams(
56 $this->linkRenderer->makeLink( $redirectTitle, $redirectText )
61 return Html::rawElement(
'div', [
'class' =>
'iw-result__title' ], $link .
' ' . $redirect ) .
62 Html::rawElement(
'div', [
'class' =>
'iw-result__content' ], $snippet );