function Roles::operators

Override empty and not empty operator labels to be clearer for user roles.

Overrides ManyToOne::operators

File

drupal/core/modules/user/lib/Drupal/user/Plugin/views/filter/Roles.php, line 30
Definition of Drupal\user\Plugin\views\filter\Roles.

Class

Roles
Filter handler for user roles.

Namespace

Drupal\user\Plugin\views\filter

Code

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;
}