You are here

function views_plugin_display::query in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_display.inc \views_plugin_display::query()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::query()

Inject anything into the query that the display handler needs.

Overrides views_plugin::query

File

plugins/views_plugin_display.inc, line 1737
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function query() {

  // Make the query distinct if the option was set.
  if ($this
    ->get_option('distinct')) {
    $this->view->query
      ->set_distinct();
  }
}