public function Roles::getValueOptions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/Plugin/views/filter/Roles.php \Drupal\user\Plugin\views\filter\Roles::getValueOptions()
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
This can use a guard to be used to reduce database hits as much as possible.
Return value
Return the stored values in $this->valueOptions if someone expects it.
Overrides InOperator::getValueOptions
File
- core/
modules/ user/ src/ Plugin/ views/ filter/ Roles.php, line 60 - Contains \Drupal\user\Plugin\views\filter\Roles.
Class
- Roles
- Filter handler for user roles.
Namespace
Drupal\user\Plugin\views\filterCode
public function getValueOptions() {
$this->valueOptions = user_role_names(TRUE);
unset($this->valueOptions[RoleInterface::AUTHENTICATED_ID]);
}