class UidRevision

Same name in this branch
  1. 11.x core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision
Same name in other branches
  1. 9 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision
  2. 9 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision
  3. 8.9.x core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision
  4. 8.9.x core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision
  5. 10 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision
  6. 10 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision

Filter handler, accepts a user ID.

Checks for nodes that a user posted or created a revision on.

Hierarchy

Expanded class hierarchy of UidRevision

File

core/modules/node/src/Plugin/views/argument/UidRevision.php, line 13

Namespace

Drupal\node\Plugin\views\argument
View source
class UidRevision extends Uid {
    public function query($group_by = FALSE) {
        $this->ensureMyTable();
        $placeholder = $this->placeholder();
        $this->query
            ->addWhereExpression(0, "{$this->tableAlias}.uid = {$placeholder} OR ((SELECT COUNT(DISTINCT vid) FROM {node_revision} nr WHERE nr.revision_uid = {$placeholder} AND nr.nid = {$this->tableAlias}.nid) > 0)", [
            $placeholder => $this->argument,
        ]);
    }

}

Members

Title Sort descending Modifiers Object type Summary
UidRevision::query public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.