You are here

function calendar_plugin_display_attachment::query in Calendar 7

Same name and namespace in other branches
  1. 6.2 includes/calendar_plugin_display_attachment.inc \calendar_plugin_display_attachment::query()
  2. 7.2 includes/calendar_plugin_display_attachment.inc \calendar_plugin_display_attachment::query()

Inject anything into the query that the display handler needs.

Overrides views_plugin_display::query

File

includes/calendar_plugin_display_attachment.inc, line 159
Views display plugin for the Calendar module.

Class

calendar_plugin_display_attachment
The plugin that handles calendar attachment displays.

Code

function query() {

  // If we are using legend colors based on taxonomy, make sure the
  // node vid field is added to the query so the theme can use it.
  if (!empty($this->view->date_info->calendar_colors_taxonomy)) {
    if (empty($this->additional_fields)) {
      $this->additional_fields = array();
    }
    $this->view->query
      ->add_field('node', 'vid');
  }
  parent::query();
}