public function UserName::processSummaryArguments in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/Plugin/views/argument_validator/UserName.php \Drupal\user\Plugin\views\argument_validator\UserName::processSummaryArguments()
Process the summary arguments for displaying.
Some plugins alter the argument so it uses something else internally. For example the user validation set's the argument to the uid, for a faster query. But there are use cases where you want to use the old value again, for example the summary.
Overrides ArgumentValidatorPluginBase::processSummaryArguments
File
- core/
modules/ user/ src/ Plugin/ views/ argument_validator/ UserName.php, line 75 - Contains \Drupal\user\Plugin\views\argument_validator\UserName.
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 an 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();
}
}