You are here

public function SearchApiQuery::getOption in Search API 8

Retrieves an option set on this search query.

Parameters

string $name: The name of an option.

mixed $default: The value to return if the specified option is not set.

Return value

mixed The value of the option with the specified name, if set. NULL otherwise.

See also

\Drupal\search_api\Query\QueryInterface::getOption()

1 call to SearchApiQuery::getOption()
SearchApiQuery::getAccessAccount in src/Plugin/views/query/SearchApiQuery.php
Retrieves the account object to use for access checks for this query.

File

src/Plugin/views/query/SearchApiQuery.php, line 1440

Class

SearchApiQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\search_api\Plugin\views\query

Code

public function getOption($name, $default = NULL) {
  if (!$this
    ->shouldAbort()) {
    return $this->query
      ->getOption($name, $default);
  }
  return $default;
}