function UserName::processSummaryArguments
Same name in other branches
- 8.9.x core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
- 10 core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
- 11.x core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
Overrides ArgumentValidatorPluginBase::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_validatorCode
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.