UserUid.php
Same filename in this branch
Same filename in other branches
- 9 core/modules/tracker/src/Plugin/views/filter/UserUid.php
- 9 core/modules/tracker/src/Plugin/views/argument/UserUid.php
- 9 core/modules/comment/src/Plugin/views/filter/UserUid.php
- 9 core/modules/comment/src/Plugin/views/argument/UserUid.php
- 10 core/modules/tracker/src/Plugin/views/filter/UserUid.php
- 10 core/modules/tracker/src/Plugin/views/argument/UserUid.php
- 10 core/modules/comment/src/Plugin/views/filter/UserUid.php
- 10 core/modules/comment/src/Plugin/views/argument/UserUid.php
- 11.x core/modules/tracker/src/Plugin/views/filter/UserUid.php
- 11.x core/modules/tracker/src/Plugin/views/argument/UserUid.php
- 11.x core/modules/comment/src/Plugin/views/filter/UserUid.php
- 11.x core/modules/comment/src/Plugin/views/argument/UserUid.php
Namespace
Drupal\tracker\Plugin\views\filterFile
-
core/
modules/ tracker/ src/ Plugin/ views/ filter/ UserUid.php
View source
<?php
namespace Drupal\tracker\Plugin\views\filter;
use Drupal\user\Plugin\views\filter\Name;
/**
* UID filter to check for nodes that a user posted or commented on.
*
* @ingroup views_filter_handlers
*
* @ViewsFilter("tracker_user_uid")
*/
class UserUid extends Name {
/**
* {@inheritdoc}
*/
public function query() {
// Because this handler thinks it's an argument for a field on the {node}
// table, we need to make sure {tracker_user} is JOINed and use its alias
// for the WHERE clause.
$tracker_user_alias = $this->query
->ensureTable('tracker_user');
// Cast scalars to array so we can consistently use an IN condition.
$this->query
->addWhere(0, "{$tracker_user_alias}.uid", (array) $this->value, 'IN');
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UserUid | UID filter to check for nodes that a user posted or commented on. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.