You are here

protected function D3ViewsDataMapping::form1DN in d3.js 7

1-dimensional numeric array of fields / labels.

File

modules/d3_views/includes/D3ViewsDataMapping.inc, line 61

Class

D3ViewsDataMapping

Code

protected function form1DN(&$form, &$form_state, $data, $key) {
  $element =& $form['fields'][$key];
  $cardinality = $data['_info']['cardinality'];
  $k = 0;
  do {
    $default_values = $this->plugin
      ->getDefaultValues($key, $k, $form_state);
    $this
      ->formRow($element[$k], $data, $form_state, $default_values);
    $k++;
    if (!empty($cardinality) && $k >= $cardinality) {
      break;
    }
  } while (!empty($default_values->field) && $default_values->field != '__none');
}