You are here

function smart_ip_views_bridge_openlayers_proximity_handler_filter_square::op_process in Smart IP 6

Same name and namespace in other branches
  1. 6.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_openlayers_proximity_handler_filter_square.inc \smart_ip_views_bridge_openlayers_proximity_handler_filter_square::op_process()
  2. 7.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_openlayers_proximity_handler_filter_square.inc \smart_ip_views_bridge_openlayers_proximity_handler_filter_square::op_process()

Process operator.

File

modules/smart_ip_views_bridge/views/smart_ip_views_bridge_openlayers_proximity_handler_filter_square.inc, line 8

Class

smart_ip_views_bridge_openlayers_proximity_handler_filter_square

Code

function op_process($op = 'simple', $field) {
  if (isset($this->view->exposed_input) && !empty($this->view->exposed_input)) {
    $exposed_input = $this->view->exposed_input['flat']['location'];
    $this->options['value']['location'] = $exposed_input;
    foreach ($this->value as $key => $value) {
      if (is_numeric($key)) {
        $this->value[$key]['location'] = $exposed_input;
      }
      elseif ($key == 'location') {
        $this->value['location'] = $exposed_input;
      }
    }
  }
  else {
    $token = $this->options['value']['location'];
    smart_ip_views_bridge_substitute_token_value($this->options['value']['location'], $token);
    foreach ($this->value as $key => $value) {
      if (is_numeric($key)) {

        //smart_ip_views_bridge_substitute_token_value($this->value[$key]['location'], $token);
      }
      elseif ($key == 'location') {
        smart_ip_views_bridge_substitute_token_value($this->value['location'], $token);
      }
    }
  }

  //$this->table = 'openlayers_proximity';
  $this->table_alias = 'openlayers_proximity';

  //$this->field = 'flat';

  // $this->real_field = 'flat';
  // $this->options['table'] = 'openlayers_proximity';
  // $this->options['field'] = 'flat';
  parent::op_process($op, $field);
}