function views_handler_filter_numeric::operators

8 calls to views_handler_filter_numeric::operators()
views_handler_filter_date::accept_exposed_input in handlers/views_handler_filter_date.inc
Do some minor translation of the exposed input.
views_handler_filter_date::validate_valid_time in handlers/views_handler_filter_date.inc
Validate that the time values convert to something usable.
views_handler_filter_group_by_numeric::query in handlers/views_handler_filter_group_by_numeric.inc
Add this filter to the query.
views_handler_filter_ncs_last_updated::query in modules/comment/views_handler_filter_ncs_last_updated.inc
Add this filter to the query.
views_handler_filter_numeric::accept_exposed_input in handlers/views_handler_filter_numeric.inc
Do some minor translation of the exposed input.

... See full list

File

handlers/views_handler_filter_numeric.inc, line 40

Class

views_handler_filter_numeric
Simple filter to handle greater than/less than filters.

Code

public function operators() {
    $operators = array(
        '<' => array(
            'title' => t('Is less than'),
            'method' => 'op_simple',
            'short' => t('<'),
            'values' => 1,
        ),
        '<=' => array(
            'title' => t('Is less than or equal to'),
            'method' => 'op_simple',
            'short' => t('<='),
            'values' => 1,
        ),
        '=' => array(
            'title' => t('Is equal to'),
            'method' => 'op_simple',
            'short' => t('='),
            'values' => 1,
        ),
        '!=' => array(
            'title' => t('Is not equal to'),
            'method' => 'op_simple',
            'short' => t('!='),
            'values' => 1,
        ),
        '>=' => array(
            'title' => t('Is greater than or equal to'),
            'method' => 'op_simple',
            'short' => t('>='),
            'values' => 1,
        ),
        '>' => array(
            'title' => t('Is greater than'),
            'method' => 'op_simple',
            'short' => t('>'),
            'values' => 1,
        ),
        'between' => array(
            'title' => t('Is between'),
            'method' => 'op_between',
            'short' => t('between'),
            'values' => 2,
        ),
        'not between' => array(
            'title' => t('Is not between'),
            'method' => 'op_between',
            'short' => t('not between'),
            'values' => 2,
        ),
    );
    // If the definition allows for the empty operator, add it.
    if (!empty($this->definition['allow empty'])) {
        $operators += array(
            'empty' => array(
                'title' => t('Is empty (NULL)'),
                'method' => 'op_empty',
                'short' => t('empty'),
                'values' => 0,
            ),
            'not empty' => array(
                'title' => t('Is not empty (NOT NULL)'),
                'method' => 'op_empty',
                'short' => t('not empty'),
                'values' => 0,
            ),
        );
    }
    // Add regexp support for MySQL.
    if (Database::getConnection()->databaseType() == 'mysql') {
        $operators += array(
            'regular_expression' => array(
                'title' => t('Regular expression'),
                'short' => t('regex'),
                'method' => 'op_regex',
                'values' => 1,
            ),
            'not_regular_expression' => array(
                'title' => t('Not regular expression'),
                'short' => t('not regex'),
                'method' => 'op_not_regex',
                'values' => 1,
            ),
        );
    }
    return $operators;
}