You are here

function _term_level_extract_default_values in Term Level Field 7

Transforms the default values into a more usable structure.

1 call to _term_level_extract_default_values()
term_level_field_widget_form in ./term_level.module
Implements hook_field_widget_form().

File

./term_level.module, line 385
Field type for referencing terms with a level to an entity.

Code

function _term_level_extract_default_values($items = array()) {
  $default_values = array();
  foreach ($items as $item) {
    $default_values[$item['tid']] = $item['level'];
  }
  return $default_values;
}