You are here

protected function D3ViewsDataMapping::formRepeated in d3.js 7

1 call to D3ViewsDataMapping::formRepeated()
D3ViewsDataMapping::form in modules/d3_views/includes/D3ViewsDataMapping.inc

File

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

Class

D3ViewsDataMapping

Code

protected function formRepeated(&$form, &$form_state) {
  $options = $this->plugin
    ->getFieldOptions($form_state);
  $fields =& $form['fields'];
  foreach ($this->library
    ->getFields() as $key => $field) {
    if ($key == '_info') {
      continue;
    }
    if ($key == $this->library
      ->getDataKey()) {
      foreach ($field as $k => $f) {
        if (isset($f['_info']['repeated']) && $f['_info']['repeated']) {

          // TODO: handle cardinality if it is not zero, really we would just
          // inerate through the amount.
          $this
            ->formRepeatedSubRow($form, $form_state, $key, $k);
        }
      }
    }
    else {
      if (isset($field['_info']['repeated']) && $field['_info']['repeated']) {
        $this
          ->formRepeatedRow($form, $form_state, $key);
      }
    }
  }
}