You are here

function content_taxonomy_tree_data2form in Content Taxonomy 6

Same name and namespace in other branches
  1. 6.2 content_taxonomy_tree.module \content_taxonomy_tree_data2form()

Helper function to transpose the values as stored in the database to the format the content_taxonomy_tree needs to select the values

1 call to content_taxonomy_tree_data2form()
content_taxonomy_tree_process in ./content_taxonomy_tree.module
Processes the content_taxonomy_tree form element

File

./content_taxonomy_tree.module, line 167

Code

function content_taxonomy_tree_data2form($element, $values, $field) {
  $terms = array();
  foreach ($values as $delta => $entry) {
    if ($entry['value']) {
      $terms[] = $entry['value'];
    }
  }
  return $terms;
}