public function User::calculateDependencies in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::calculateDependencies()
- 9 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::calculateDependencies()
Overrides Entity::calculateDependencies
File
- core/
modules/ user/ src/ Plugin/ views/ argument_validator/ User.php, line 103
Class
- User
- Validate whether an argument is a valid user.
Namespace
Drupal\user\Plugin\views\argument_validatorCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
foreach ($this->entityTypeManager
->getStorage('user_role')
->loadMultiple(array_keys($this->options['roles'])) as $role) {
$dependencies[$role
->getConfigDependencyKey()][] = $role
->getConfigDependencyName();
}
return $dependencies;
}