function Roles::operators in Views (for Drupal 7) 8.3
Override empty and not empty operator labels to be clearer for user roles.
Overrides ManyToOne::operators
File
- lib/
Views/ user/ Plugin/ views/ filter/ Roles.php, line 33 - Definition of Views\user\Plugin\views\filter\Roles.
Class
- Roles
- Filter handler for user roles.
Namespace
Views\user\Plugin\views\filterCode
function operators() {
$operators = parent::operators();
$operators['empty']['title'] = t("Only has the 'authenticated user' role");
$operators['not empty']['title'] = t("Has roles in addition to 'authenticated user'");
return $operators;
}