public function ResultSet::getExtraData in Search API 8
Retrieves extra data for this search result.
Parameters
string $key: The key of the extra data.
mixed $default: (optional) The value to return if the data is not set.
Return value
mixed The data set for that key, or $default if the data is not present.
Overrides ResultSetInterface::getExtraData
File
- src/
Query/ ResultSet.php, line 191
Class
- ResultSet
- Represents the result set of a search query.
Namespace
Drupal\search_api\QueryCode
public function getExtraData($key, $default = NULL) {
return array_key_exists($key, $this->extraData) ? $this->extraData[$key] : $default;
}