function Permissions::getValueOptions
Same name in other branches
- 9 core/modules/user/src/Plugin/views/filter/Permissions.php \Drupal\user\Plugin\views\filter\Permissions::getValueOptions()
- 10 core/modules/user/src/Plugin/views/filter/Permissions.php \Drupal\user\Plugin\views\filter\Permissions::getValueOptions()
- 11.x core/modules/user/src/Plugin/views/filter/Permissions.php \Drupal\user\Plugin\views\filter\Permissions::getValueOptions()
Overrides InOperator::getValueOptions
File
-
core/
modules/ user/ src/ Plugin/ views/ filter/ Permissions.php, line 68
Class
- Permissions
- Filter handler for user roles.
Namespace
Drupal\user\Plugin\views\filterCode
public function getValueOptions() {
if (!isset($this->valueOptions)) {
$permissions = $this->permissionHandler
->getPermissions();
foreach ($permissions as $perm => $perm_item) {
$provider = $perm_item['provider'];
$display_name = $this->moduleHandler
->getName($provider);
$this->valueOptions[$display_name][$perm] = Html::escape(strip_tags($perm_item['title']));
}
return $this->valueOptions;
}
else {
return $this->valueOptions;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.