'#theme' =>
['item_list__search_results__' .
$plugin->
getPluginId(), 'item_list__search_results'
],
'#items' =>
$results,
'#empty' =>
[ '#markup' => '<h3>' .
$this->
t('Your search yielded no results.'
) . '</h3>',
],
'#list_type' => 'ol',
'#context' =>
[ 'plugin' =>
$plugin->
getPluginId(),
],
];
$this->renderer->
addCacheableDependency($build,
$entity);
if ($plugin instanceof CacheableDependencyInterface
) { $this->renderer->
addCacheableDependency($build,
$plugin);
} // If this plugin uses a search index, then also add the cache tag tracking
// that search index, so that cached search result pages are invalidated
// when necessary.
if ($plugin->
getType()) { $build['search_results'
]['#cache'
]['tags'
][] = 'search_index';
$build['search_results'
]['#cache'
]['tags'
][] = 'search_index:' .
$plugin->
getType();
}