'#theme' => 'username',
'#account' =>
$node->
getOwner(),
];
$result =
[ 'link' =>
$node->
toUrl('canonical',
['absolute' => TRUE
])->
toString(),
'type' =>
$type->
label(),
'title' =>
$node->
label(),
'node' =>
$node,
'extra' =>
$extra,
'score' =>
$item->calculated_score,
'snippet' =>
search_excerpt($keys,
$rendered,
$item->langcode
),
'langcode' =>
$node->
language()->
getId(),
];
$this->
addCacheableDependency($node);
// We have to separately add the node owner's cache tags because search
// module doesn't use the rendering system, it does its own rendering
// without taking cacheability metadata into account. So we have to do it
// explicitly here.
$this->
addCacheableDependency($node->
getOwner());