You are here

public function Sql::addSignature in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::addSignature()

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 QueryPluginBase::addSignature

File

core/modules/views/src/Plugin/views/query/Sql.php, line 1595
Contains \Drupal\views\Plugin\views\query\Sql.

Class

Sql
Views query plugin for an SQL query.

Namespace

Drupal\views\Plugin\views\query

Code

public function addSignature(ViewExecutable $view) {
  $view->query
    ->addField(NULL, "'" . $view->storage
    ->id() . ':' . $view->current_display . "'", 'view_name');
}