public function UidRevision::query in Zircon Profile 8
Same name in this branch
- 8 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision::query()
- 8 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
Set up the query for this argument.
The argument sent may be found at $this->argument.
Overrides NumericArgument::query
File
- core/
modules/ node/ src/ Plugin/ views/ argument/ UidRevision.php, line 20 - Contains \Drupal\node\Plugin\views\argument\UidRevision.
Class
- UidRevision
- Filter handler to accept a user id to check for nodes that user posted or created a revision on.
Namespace
Drupal\node\Plugin\views\argumentCode
public function query($group_by = FALSE) {
$this
->ensureMyTable();
$placeholder = $this
->placeholder();
$this->query
->addWhereExpression(0, "{$this->tableAlias}.revision_uid = {$placeholder} OR ((SELECT COUNT(DISTINCT vid) FROM {node_revision} nr WHERE nfr.revision_uid = {$placeholder} AND nr.nid = {$this->tableAlias}.nid) > 0)", array(
$placeholder => $this->argument,
));
}