class UidRevision in Drupal 10
Same name in this branch
- 10 core/modules/node/src/Plugin/views/filter/UidRevision.php \Drupal\node\Plugin\views\filter\UidRevision
- 10 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision
- 9 core/modules/node/src/Plugin/views/argument/UidRevision.php \Drupal\node\Plugin\views\argument\UidRevision
Filter handler to accept a user id to check for nodes that user posted or created a revision on.
Plugin annotation
@ViewsArgument("node_uid_revision");
Hierarchy
- class \Drupal\views\Plugin\views\argument\NumericArgument extends \Drupal\views\Plugin\views\argument\ArgumentPluginBase
- class \Drupal\user\Plugin\views\argument\Uid
- class \Drupal\node\Plugin\views\argument\UidRevision
- class \Drupal\user\Plugin\views\argument\Uid
Expanded class hierarchy of UidRevision
File
- core/
modules/ node/ src/ Plugin/ views/ argument/ UidRevision.php, line 13
Namespace
Drupal\node\Plugin\views\argumentView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NumericArgument:: |
public | property | The actual value which is used for querying. | |
NumericArgument:: |
public | function | 1 | |
NumericArgument:: |
protected | function | 1 | |
NumericArgument:: |
public | function | ||
NumericArgument:: |
public | function | ||
NumericArgument:: |
public | function | 2 | |
Uid:: |
protected | property | The user storage. | |
Uid:: |
public static | function | ||
Uid:: |
public | function |
Override the behavior of title(). Get the name of the user. Overrides NumericArgument:: |
|
Uid:: |
public | function | Constructs a \Drupal\user\Plugin\views\argument\Uid object. | |
UidRevision:: |
public | function |
Overrides NumericArgument:: |