You are here

class smart_ip_views_bridge_handler_field_city in Smart IP 6.2

Same name and namespace in other branches
  1. 6 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_city.inc \smart_ip_views_bridge_handler_field_city
  2. 7.2 modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_city.inc \smart_ip_views_bridge_handler_field_city

Field handler to display visitor's city.

Hierarchy

Expanded class hierarchy of smart_ip_views_bridge_handler_field_city

1 string reference to 'smart_ip_views_bridge_handler_field_city'
smart_ip_views_bridge_views_data in modules/smart_ip_views_bridge/views/smart_ip_views_bridge.views.inc
Implements hook_views_data().

File

modules/smart_ip_views_bridge/views/smart_ip_views_bridge_handler_field_city.inc, line 12
Contains the 'smart_ip_views_bridge_handler_field_city' field handler.

View source
class smart_ip_views_bridge_handler_field_city extends views_handler_field {
  function query() {
    $this->field_alias = 'smart_ip_views_bridge_city_' . $this->position;
    $this->query
      ->add_field('', 1, $this->field_alias);
  }
  function option_definition() {
    $options = parent::option_definition();
    return $options;
  }
  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
  }
  function render($values) {
    $smart_ip_session = smart_ip_session_get('smart_ip');
    return $smart_ip_session['location']['city'];
  }

}

Members