You are here

class UserUid in Drupal 10

Same name in this branch
  1. 10 core/modules/tracker/src/Plugin/views/filter/UserUid.php \Drupal\tracker\Plugin\views\filter\UserUid
  2. 10 core/modules/tracker/src/Plugin/views/argument/UserUid.php \Drupal\tracker\Plugin\views\argument\UserUid
  3. 10 core/modules/comment/src/Plugin/views/filter/UserUid.php \Drupal\comment\Plugin\views\filter\UserUid
  4. 10 core/modules/comment/src/Plugin/views/argument/UserUid.php \Drupal\comment\Plugin\views\argument\UserUid
Same name and namespace in other branches
  1. 8 core/modules/tracker/src/Plugin/views/argument/UserUid.php \Drupal\tracker\Plugin\views\argument\UserUid
  2. 9 core/modules/tracker/src/Plugin/views/argument/UserUid.php \Drupal\tracker\Plugin\views\argument\UserUid

UID argument to check for nodes that user posted or commented on.

Plugin annotation

@ViewsArgument("tracker_user_uid");

Hierarchy

  • class \Drupal\comment\Plugin\views\argument\UserUid extends \Drupal\views\Plugin\views\argument\ArgumentPluginBase
    • class \Drupal\tracker\Plugin\views\argument\UserUid

Expanded class hierarchy of UserUid

File

core/modules/tracker/src/Plugin/views/argument/UserUid.php, line 14

Namespace

Drupal\tracker\Plugin\views\argument
View source
class UserUid extends CommentUserUid {

  /**
   * {@inheritdoc}
   */
  public function query($group_by = FALSE) {

    // 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');
    $this->query
      ->addWhere(0, "{$tracker_user_alias}.uid", $this->argument);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserUid::$database protected property Database Service Object.
UserUid::create public static function
UserUid::defaultActions protected function
UserUid::getSortName public function
UserUid::query public function Overrides UserUid::query
UserUid::title public function
UserUid::__construct public function Constructs a \Drupal\comment\Plugin\views\argument\UserUid object.