Пример #1
0
 protected function apply_grid_filters(collection_filter $col_filter)
 {
     if (!empty($this->grid_filters)) {
         $fields = $this->collection->fields();
         foreach ($fields as $key => $field) {
             $filter = @$field['filter'];
             if (isset($filter) && isset($this->grid_filters[$key])) {
                 if (!isset($filter['params'])) {
                     throw new collection_filter_exception('Empty params in filter : ' . $key);
                 }
                 $options = $filter['params'];
                 $col_filter->set_filter($key, $this->grid_filters[$key], $options[0], @$options[1], @$options[2]);
             }
         }
         foreach ($this->grid_filters as $key => $value) {
             // if ($this->params->offsetExists($key) && !$this->params->is_set($key)) {
             //    $filter->set_f $this->params->set($key, $value);
             // }
         }
     }
 }