You are here

function flot_views_plugin_style::get_flot_field in Flot 6

Same name and namespace in other branches
  1. 7 flot_views/views/flot_views_plugin_style.inc \flot_views_plugin_style::get_flot_field()

Get the first usable flot field on this view.

1 call to flot_views_plugin_style::get_flot_field()
flot_views_plugin_style::validate in views/flot_views_plugin_style.inc
Validate function.

File

views/flot_views_plugin_style.inc, line 320

Class

flot_views_plugin_style

Code

function get_flot_field() {
  $fields = $this->display->handler
    ->get_option('fields');
  foreach ($fields as $field => $info) {
    $handler = get_class(views_get_handler($info['table'], $info['field'], 'field'));
    if (method_exists($handler, 'flot_render')) {
      return $field;
    }
  }
  return FALSE;
}