public function Uid::titleQuery

Override the behavior of title(). Get the name of the user.

Return value

array A list of usernames.

Overrides Numeric::titleQuery

File

drupal/core/modules/user/lib/Drupal/user/Plugin/views/argument/Uid.php, line 28
Definition of Drupal\user\Plugin\views\argument\Uid.

Class

Uid
Argument handler to accept a user id.

Namespace

Drupal\user\Plugin\views\argument

Code

public function titleQuery() {
  if (!$this->argument) {
    return array(
      config('user.settings')
        ->get('anonymous'),
    );
  }
  $titles = array();
  $users = user_load_multiple($this->value);
  foreach ($users as $account) {
    $titles[] = check_plain($account
      ->label());
  }
  return $titles;
}