You are here

function charts_plugin_style_chart::aggregated_field_options in Charts 6

Same name and namespace in other branches
  1. 7 views/charts_plugin_style_chart.inc \charts_plugin_style_chart::aggregated_field_options()

Create an options array of available fields from this view.

1 call to charts_plugin_style_chart::aggregated_field_options()
charts_plugin_style_chart::options_form in views/charts_plugin_style_chart.inc
Generate a form for setting options.

File

views/charts_plugin_style_chart.inc, line 102
Contains the chart style plugin. @author Bruno Massa http://drupal.org/user/67164 @author Karen Stevenson http://drupal.org/user/45874

Class

charts_plugin_style_chart
Style plugin to render view as a chart.

Code

function aggregated_field_options() {
  $field_names = array();
  $handlers = $this->display->handler
    ->get_handlers('field');
  foreach ($handlers as $field => $handler) {
    if ($label = $handler
      ->label()) {
      $field_names[$field] = $label;
    }
    else {
      $field_names[$field] = $handler
        ->ui_name();
    }
  }
  return $field_names;
}