public function ResultSet::getStatistics in Google Search Appliance 8
Gets statistics information for search result.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup Statistics information.
File
- src/
SearchResults/ ResultSet.php, line 384
Class
- ResultSet
- Defines a value object for a search response.
Namespace
Drupal\google_appliance\SearchResultsCode
public function getStatistics() {
return $this
->t('Showing results @first - @last for %query', [
'@first' => (int) $this->lastResult - count($this->results) + 1,
'@last' => $this->lastResult,
'%query' => $this->query
->getSearchQuery(),
]);
}