public function UserUid::query in Zircon Profile 8.0
Same name in this branch
- 8.0 core/modules/tracker/src/Plugin/views/filter/UserUid.php \Drupal\tracker\Plugin\views\filter\UserUid::query()
- 8.0 core/modules/tracker/src/Plugin/views/argument/UserUid.php \Drupal\tracker\Plugin\views\argument\UserUid::query()
- 8.0 core/modules/comment/src/Plugin/views/filter/UserUid.php \Drupal\comment\Plugin\views\filter\UserUid::query()
- 8.0 core/modules/comment/src/Plugin/views/argument/UserUid.php \Drupal\comment\Plugin\views\argument\UserUid::query()
Same name and namespace in other branches
- 8 core/modules/tracker/src/Plugin/views/filter/UserUid.php \Drupal\tracker\Plugin\views\filter\UserUid::query()
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides InOperator::query
File
- core/
modules/ tracker/ src/ Plugin/ views/ filter/ UserUid.php, line 24 - Contains \Drupal\tracker\Plugin\views\filter\UserUid.
Class
- UserUid
- UID filter to check for nodes that a user posted or commented on.
Namespace
Drupal\tracker\Plugin\views\filterCode
public function query() {
// 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
->ensureTable('tracker_user');
// Cast scalars to array so we can consistently use an IN condition.
$this->query
->addWhere(0, "{$tracker_user_alias}.uid", (array) $this->value, 'IN');
}