You are here

function views_handler_field_content_multiple::query in Content Construction Kit (CCK) 6

File

includes/content.views.inc, line 392

Class

views_handler_field_content_multiple
An extended subclass for field handling that adds multiple field grouping.

Code

function query() {
  $field = $this->content_field;
  $options = $this->options;

  //  if (in_array($field['handler'], array('content_views_field_handler_group', 'content_views_field_handler_first', 'content_views_field_handler_last'))) {
  // TODO : multiple_number / multiple_from
  // We can also optimize the query when only one value should be retrieved
  $this->defer_query = $options['multiple']['group'] && $field['multiple'];

  // If this is not a grouped field, use the generic field handler query.
  if (!$this->defer_query) {
    return parent::query();
  }

  // We don't add anything to the query. The data is retrieved in pre_render()
  // in order to avoid duplicate results.
  $this->field_alias = $this->real_field;

  // If the field is sortable (table sort), we just have to join the table
  // ("Node: Distinct" will be required to avoid duplicates...)
  // if ($field['sortable']) {
  //   $this->ensure_my_table();
  // }
}