function User::calculateDependencies
Same name in other branches
- 9 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::calculateDependencies()
- 8.9.x core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User::calculateDependencies()
- 11.x 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 109
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.