function UserName::processSummaryArguments

Same name and namespace in other branches
  1. 11.x core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
  2. 10 core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
  3. 8.9.x 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();
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.