You are here

public function views_plugin_query_default::add_signature in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_query_default.inc \views_plugin_query_default::add_signature()

Add a signature to the query, if such a thing is feasible.

This signature is something that can be used when perusing query logs to discern where particular queries might be coming from.

Parameters

view $view: The view which is executed.

Overrides views_plugin_query::add_signature

File

plugins/views_plugin_query_default.inc, line 1557
Definition of views_plugin_query_default.

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

public function add_signature(&$view) {
  $view->query
    ->add_field(NULL, "'" . $view->name . ':' . $view->current_display . "'", 'view_name');
}