src/orm/classes/UI/List/DataProvider.php
private function setFilter(ezcQuerySelect $query)
    {
        $map = array('<' => 'lt', '<=' => 'lte', '>' => 'gt', '>=' => 'gte');
        $andParts = array();
        foreach ($this->filter as $rule)
        {
            $field = $rule[0];
            $value = $rule[1];
            $method = null;
            if ($rule[2] == '=')
            {
                $method = 'eq';
                if (is_array($value))
                {
                    $method = 'in';
                }
            }
            elseif (isset($map[$rule[2]]))
            {
                $method = $map[$rule[2]];
            }
            if ($method)
            {
                if ($value instanceof ORM_Entity)
                {
                    $value = $value->getPrimaryKey();
                }

                $andParts []= $query->expr->$method($field,
                    is_array($value) ? $value : $query->bindValue($value));
            }
        }
        /*
        if (count($this->fulltext))
        {
            foreach ($this->fulltext as $fulltext)
            {
                $q = $this->buildFullTextQuery($fulltext[0], $fulltext[1]);
                if ($q)
                {
                    $andParts []= '(' . $q . ')';
                }
            }
        }
        */

        if (count($andParts))
        {
            $where = call_user_func_array(array($query->expr, 'lAnd'), $andParts);
            $query->where($where);
        }
    }
private function setFilter(ezcQuerySelect $query)
    {
        $map = array('<' => 'lt', '<=' => 'lte', '>' => 'gt', '>=' => 'gte');
        $andParts = array();
        foreach ($this->filter as $rule)
        {
            $field = $rule[0];
            $value = $rule[1];
            $method = null;
            if ($rule[2] == '=')
            {
                $method = 'eq';
                if (is_array($value))
                {
                    $method = 'in';
                }
            }
            elseif (isset($map[$rule[2]]))
            {
                $method = $map[$rule[2]];
            }
            if ($method)
            {
                if ($value instanceof ORM_Entity)
                {
                    $value = $value->getPrimaryKey();
                }

                $andParts []= $query->expr->$method($field,
                    is_array($value) ? $value : $query->bindValue($value));
            }
        }
        /*
        if (count($this->fulltext))
        {
            foreach ($this->fulltext as $fulltext)
            {
                $q = $this->buildFullTextQuery($fulltext[0], $fulltext[1]);
                if ($q)
                {
                    $andParts []= '(' . $q . ')';
                }
            }
        }
        */

        if (count($andParts))
        {
            $where = call_user_func_array(array($query->expr, 'lAnd'), $andParts);
            $query->where($where);
        }
    }
Применяет фильтр к запросу

@param ezcQuerySelect $query

@return void

@since 1.00