public function UserUid::query

Same name in this branch

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides UserUid::query

File

drupal/core/modules/tracker/lib/Drupal/tracker/Plugin/views/argument/UserUid.php, line 25
Contains \Drupal\tracker\Plugin\views\argument\UserUid

Class

UserUid
UID argument to check for nodes that user posted or commented on.

Namespace

Drupal\tracker\Plugin\views\argument

Code

public function query($group_by = FALSE) {

  // Because this handler thinks it's an argument for a field on the {node}
  // table, we need to make sure {tracker_user} is JOINed and use its alias
  // for the WHERE clause.
  $tracker_user_alias = $this->query
    ->ensure_table('tracker_user');
  $this->query
    ->addWhere(0, "{$tracker_user_alias}.uid", $this->argument);
}