You are here

protected function Search::queryParseSearchExpression in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/search/src/Plugin/views/filter/Search.php \Drupal\search\Plugin\views\filter\Search::queryParseSearchExpression()
  2. 8 core/modules/search/src/Plugin/views/argument/Search.php \Drupal\search\Plugin\views\argument\Search::queryParseSearchExpression()
Same name and namespace in other branches
  1. 8.0 core/modules/search/src/Plugin/views/argument/Search.php \Drupal\search\Plugin\views\argument\Search::queryParseSearchExpression()

Sets up and parses the search query.

Parameters

string $input: The search keywords entered by the user.

1 call to Search::queryParseSearchExpression()
Search::query in core/modules/search/src/Plugin/views/argument/Search.php
Set up the query for this argument.

File

core/modules/search/src/Plugin/views/argument/Search.php, line 53
Contains \Drupal\search\Plugin\views\argument\Search.

Class

Search
Argument handler for search keywords.

Namespace

Drupal\search\Plugin\views\argument

Code

protected function queryParseSearchExpression($input) {
  if (!isset($this->searchQuery)) {
    $this->searchQuery = db_select('search_index', 'i', array(
      'target' => 'replica',
    ))
      ->extend('Drupal\\search\\ViewsSearchQuery');
    $this->searchQuery
      ->searchExpression($input, $this->searchType);
    $this->searchQuery
      ->publicParseSearchExpression();
  }
}