You are here

protected function SearchApiStandard::fillValue in Search API 8

Fills $this->value and $this->operator with data from the argument.

5 calls to SearchApiStandard::fillValue()
SearchApiAllTerms::query in src/Plugin/views/argument/SearchApiAllTerms.php
Set up the query for this argument.
SearchApiDate::query in src/Plugin/views/argument/SearchApiDate.php
Set up the query for this argument.
SearchApiDate::title in src/Plugin/views/argument/SearchApiDate.php
Get the title this argument will assign the view, given the argument.
SearchApiStandard::query in src/Plugin/views/argument/SearchApiStandard.php
Set up the query for this argument.
SearchApiTerm::title in src/Plugin/views/argument/SearchApiTerm.php
Get the title this argument will assign the view, given the argument.

File

src/Plugin/views/argument/SearchApiStandard.php, line 198

Class

SearchApiStandard
Defines a contextual filter for applying Search API conditions.

Namespace

Drupal\search_api\Plugin\views\argument

Code

protected function fillValue() {
  if (isset($this->value)) {
    return;
  }
  $filter = '';
  if (!empty($this->definition['filter'])) {
    $filter = $this->definition['filter'];
  }
  if (!empty($this->options['break_phrase']) && empty($this->definition['disable_break_phrase'])) {
    $force_int = FALSE;
    if ($filter == 'intval') {
      $force_int = TRUE;
      $filter = '';
    }
    $this
      ->unpackArgumentValue($force_int);
  }
  else {
    $this->value = [
      $this->argument,
    ];
    $this->operator = 'and';
  }
  if (is_callable($filter)) {
    $this->value = array_map($filter, $this->value);
  }
}