UidRevision.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/node/src/Plugin/views/filter/UidRevision.php
- 9 core/modules/node/src/Plugin/views/argument/UidRevision.php
- 8.9.x core/modules/node/src/Plugin/views/filter/UidRevision.php
- 8.9.x core/modules/node/src/Plugin/views/argument/UidRevision.php
- 10 core/modules/node/src/Plugin/views/filter/UidRevision.php
- 10 core/modules/node/src/Plugin/views/argument/UidRevision.php
Namespace
Drupal\node\Plugin\views\filterFile
-
core/
modules/ node/ src/ Plugin/ views/ filter/ UidRevision.php
View source
<?php
namespace Drupal\node\Plugin\views\filter;
use Drupal\user\Plugin\views\filter\Name;
use Drupal\views\Attribute\ViewsFilter;
/**
* Filter handler to check for revisions a certain user has created.
*
* @ingroup views_filter_handlers
*/
class UidRevision extends Name {
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);
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UidRevision | Filter handler to check for revisions a certain user has created. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.