You are here

function SearchApiStringFilter::set_where_group in Search API Extended String Filter 7

1 call to SearchApiStringFilter::set_where_group()
SearchApiStringFilter::add_where_expression in includes/handler_filter_string.inc

File

includes/handler_filter_string.inc, line 386

Class

SearchApiStringFilter

Code

function set_where_group($type = 'AND', $group = NULL, $where = 'where') {

  // Set an alias.
  $groups =& $this->query->{$where};
  if (!isset($group)) {
    $group = empty($groups) ? 1 : max(array_keys($groups)) + 1;
  }

  // Create an empty group
  if (empty($groups[$group])) {
    $groups[$group] = array(
      'conditions' => array(),
      'args' => array(),
    );
  }
  $groups[$group]['type'] = strtoupper($type);
  return $group;
}