You are here

public function date_views_filter_handler_simple::operators in Date 7.2

Same name and namespace in other branches
  1. 7.3 date_views/includes/date_views_filter_handler_simple.inc \date_views_filter_handler_simple::operators()

Overrides views_handler_filter_numeric::operators

File

date_views/includes/date_views_filter_handler_simple.inc, line 64
A standard Views filter for a single date field.

Class

date_views_filter_handler_simple
A standard Views filter for a single date field.

Code

public function operators() {

  // Cache the operators that are being added.
  static $new_operators;
  if (!isset($new_operators)) {
    $new_operators = array(
      'title' => t('Contains'),
      'method' => 'op_contains',
      'short' => t('contains'),
      'values' => 1,
    );
  }

  // Add the new 'contains' operators.
  $operators = parent::operators();
  $operators['contains'] = $new_operators;
  return $operators;
}