public function HistoryUserTimestamp::query

Same name in this branch
  1. 8.x drupal/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php \Drupal\history\Plugin\views\field\HistoryUserTimestamp::query()
  2. 8.x drupal/core/modules/history/lib/Drupal/history/Plugin/views/filter/HistoryUserTimestamp.php \Drupal\history\Plugin\views\filter\HistoryUserTimestamp::query()

Called to add the field to a query.

Overrides FieldPluginBase::query

File

drupal/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php, line 63
Contains \Drupal\history\Plugin\views\field\HistoryUserTimestamp.

Class

HistoryUserTimestamp
Field handler to display the marker for new content.

Namespace

Drupal\history\Plugin\views\field

Code

public function query() {

  // Only add ourselves to the query if logged in.
  global $user;
  if (!$user->uid) {
    return;
  }
  parent::query();
}