function UidRevision::query
Same name in this branch
- 11.x core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
Same name in other branches
- 9 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision::query()
- 9 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
- 8.9.x core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision::query()
- 8.9.x core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
- 10 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision::query()
- 10 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision::query()
Overrides InOperator::query
File
-
core/
modules/ node/ src/ Plugin/ views/ filter/ UidRevision.php, line 16
Class
- UidRevision
- Filter handler to check for revisions a certain user has created.
Namespace
Drupal\node\Plugin\views\filterCode
public function query($group_by = FALSE) {
$this->ensureMyTable();
$placeholder = $this->placeholder() . '[]';
$args = array_values($this->value);
$this->query
->addWhereExpression($this->options['group'], "{$this->tableAlias}.uid IN({$placeholder}) OR\n ((SELECT COUNT(DISTINCT vid) FROM {node_revision} nr WHERE nr.revision_uid IN ({$placeholder}) AND nr.nid = {$this->tableAlias}.nid) > 0)", [
$placeholder => $args,
], $args);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.