You are here

public function UserName::processSummaryArguments in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
  2. 9 core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()

File

core/modules/user/src/Plugin/views/argument_validator/UserName.php, line 70

Class

UserName
Validates whether a user name is valid.

Namespace

Drupal\user\Plugin\views\argument_validator

Code

public function processSummaryArguments(&$args) {

  // If the validation says the input is a username, we should reverse the
  // argument so it works for example for generation summary urls.
  $uids_arg_keys = array_flip($args);
  foreach ($this->userStorage
    ->loadMultiple($args) as $uid => $account) {
    $args[$uids_arg_keys[$uid]] = $account
      ->label();
  }
}