You are here

function flot_views_plugin_style::get_flot_field in Flot 7

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

Get the first usable flot field on this view.

2 calls to flot_views_plugin_style::get_flot_field()
flot_views_plugin_style::preprocess in flot_views/views/flot_views_plugin_style.inc
Theme template preprocessor.
flot_views_plugin_style::validate in flot_views/views/flot_views_plugin_style.inc
Validate function.

File

flot_views/views/flot_views_plugin_style.inc, line 206

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;
}