You are here

public function ldap_views_handler_filter_attribute::operators in Lightweight Directory Access Protocol (LDAP) 7.2

Same name and namespace in other branches
  1. 8.2 ldap_views/handlers/ldap_views_handler_filter_attribute.inc \ldap_views_handler_filter_attribute::operators()
  2. 7 ldap_views/handlers/ldap_views_handler_filter_attribute.inc \ldap_views_handler_filter_attribute::operators()

This kind of construct makes it relatively easy for a child class to add or remove functionality by overriding this function and adding/removing items from this array.

Overrides ldap_views_handler_filter::operators

File

ldap_views/handlers/ldap_views_handler_filter_attribute.inc, line 35
Basic textfield filter to handle string filtering commands for a generic ldap attribute Includes new criterias.

Class

ldap_views_handler_filter_attribute

Code

public function operators() {
  $operators = [
    'exists' => [
      'title' => t('Exists'),
      'method' => 'op_exists',
      'short' => t('exists'),
      'values' => 0,
    ],
    'not exists' => [
      'title' => t('Not exists'),
      'method' => 'op_exists',
      'short' => t('not exists'),
      'values' => 0,
    ],
  ];
  return parent::operators() + $operators;
}