function Role::calculateDependencies
Same name in this branch
- 9 core/modules/user/src/Entity/Role.php \Drupal\user\Entity\Role::calculateDependencies()
Same name in other branches
- 8.9.x core/modules/user/src/Plugin/views/access/Role.php \Drupal\user\Plugin\views\access\Role::calculateDependencies()
- 10 core/modules/user/src/Entity/Role.php \Drupal\user\Entity\Role::calculateDependencies()
- 10 core/modules/user/src/Plugin/views/access/Role.php \Drupal\user\Plugin\views\access\Role::calculateDependencies()
- 11.x core/modules/user/src/Entity/Role.php \Drupal\user\Entity\Role::calculateDependencies()
- 11.x core/modules/user/src/Plugin/views/access/Role.php \Drupal\user\Plugin\views\access\Role::calculateDependencies()
Overrides PluginBase::calculateDependencies
File
-
core/
modules/ user/ src/ Plugin/ views/ access/ Role.php, line 131
Class
- Role
- Access plugin that provides role-based access control.
Namespace
Drupal\user\Plugin\views\accessCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
foreach (array_keys($this->options['role']) as $rid) {
if ($role = $this->roleStorage
->load($rid)) {
$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.