public function ResultSet::addResultItem in Search API 8
Adds a new result item.
This method has to be invoked in the correct order, with the first-ordered item being added first and so on.
Parameters
\Drupal\search_api\Item\ItemInterface $result_item: One of the search results.
Return value
$this
Overrides ResultSetInterface::addResultItem
File
- src/
Query/ ResultSet.php, line 97
Class
- ResultSet
- Represents the result set of a search query.
Namespace
Drupal\search_api\QueryCode
public function addResultItem(ItemInterface $result_item) {
$this->resultItems[$result_item
->getId()] = $result_item;
return $this;
}