You are here

public function ldap_views_handler_filter::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.inc \ldap_views_handler_filter::operators()
  2. 7 ldap_views/handlers/ldap_views_handler_filter.inc \ldap_views_handler_filter::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.

4 calls to ldap_views_handler_filter::operators()
ldap_views_handler_filter::operator_options in ldap_views/handlers/ldap_views_handler_filter.inc
Build strings from the operators() for 'select' options.
ldap_views_handler_filter::operator_values in ldap_views/handlers/ldap_views_handler_filter.inc
ldap_views_handler_filter::query in ldap_views/handlers/ldap_views_handler_filter.inc
Add this filter to the query.
ldap_views_handler_filter_attribute::operators in ldap_views/handlers/ldap_views_handler_filter_attribute.inc
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.
1 method overrides ldap_views_handler_filter::operators()
ldap_views_handler_filter_attribute::operators in ldap_views/handlers/ldap_views_handler_filter_attribute.inc
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.

File

ldap_views/handlers/ldap_views_handler_filter.inc, line 32
Basic textfield filter to handle string filtering commands including equality, contains, not contains, etc.

Class

ldap_views_handler_filter

Code

public function operators() {
  $operators = [
    '=' => [
      'title' => t('Is equal to'),
      'short' => t('='),
      'method' => 'op_equal',
      'values' => 1,
    ],
    '!=' => [
      'title' => t('Is not equal to'),
      'short' => t('!='),
      'method' => 'op_equal',
      'values' => 1,
    ],
    'contains' => [
      'title' => t('Contains'),
      'short' => t('contains'),
      'method' => 'op_contains',
      'values' => 1,
    ],
    'starts' => [
      'title' => t('Starts with'),
      'short' => t('begins'),
      'method' => 'op_starts',
      'values' => 1,
    ],
    'not_starts' => [
      'title' => t('Does not start with'),
      'short' => t('not_begins'),
      'method' => 'op_not_starts',
      'values' => 1,
    ],
    'ends' => [
      'title' => t('Ends with'),
      'short' => t('ends'),
      'method' => 'op_ends',
      'values' => 1,
    ],
    'not_ends' => [
      'title' => t('Does not end with'),
      'short' => t('not_ends'),
      'method' => 'op_not_ends',
      'values' => 1,
    ],
    'not' => [
      'title' => t('Does not contain'),
      'short' => t('!has'),
      'method' => 'op_not',
      'values' => 1,
    ],
    'greater' => [
      'title' => t('Greater than or equal to'),
      'short' => t('greater_eq'),
      'method' => 'op_greater_eq',
      'values' => 1,
    ],
    'less' => [
      'title' => t('Less than or equal to'),
      'short' => t('less_eq'),
      'method' => 'op_less_eq',
      'values' => 1,
    ],
  ];
  return $operators;
}