You are here

public function Query::hasTag in Search API 8

Checks whether a certain tag was set on this search query.

Parameters

string $tag: The tag to check for.

Return value

bool TRUE if the tag was set for this search query, FALSE otherwise.

Overrides QueryInterface::hasTag

File

src/Query/Query.php, line 723

Class

Query
Provides a standard implementation for a Search API query.

Namespace

Drupal\search_api\Query

Code

public function hasTag($tag) {
  return isset($this->tags[$tag]);
}