You are here

function elasticsearch_connector_views_query::set_where_group in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 modules/elasticsearch_connector_views/elasticsearch_connector_views_query.inc \elasticsearch_connector_views_query::set_where_group()
  2. 7.2 modules/elasticsearch_connector_views/elasticsearch_connector_views_query.inc \elasticsearch_connector_views_query::set_where_group()

Support for groupping.

Overrides views_plugin_query::set_where_group

See also

views_plugin_query_default::set_where_group().

1 call to elasticsearch_connector_views_query::set_where_group()
elasticsearch_connector_views_query::add_where in modules/elasticsearch_connector_views/elasticsearch_connector_views_query.inc
Support for groupping.

File

modules/elasticsearch_connector_views/elasticsearch_connector_views_query.inc, line 288
Class for handling a view that gets its data not from the database, but from a Solr server.

Class

elasticsearch_connector_views_query
@file Class for handling a view that gets its data not from the database, but from a Solr server.

Code

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

  // Set an alias.
  $groups =& $this->{$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;
}