You are here

function taxonomy_patterns_export_all_terms in Patterns 7

Same name and namespace in other branches
  1. 7.2 patterns_components/components/taxonomy.inc \taxonomy_patterns_export_all_terms()
1 string reference to 'taxonomy_patterns_export_all_terms'
taxonomy_patterns in patterns_components/components/taxonomy.inc

File

patterns_components/components/taxonomy.inc, line 61
Patterns component for taxonomy vocabularies and terms.

Code

function taxonomy_patterns_export_all_terms($args = NULL, $result = NULL) {
  $info = taxonomy_patterns();
  $terms = entity_load('taxonomy_term');
  $form_id = current($info['term'][PATTERNS_MODIFY]);
  $result = array();
  foreach ($terms as $term) {

    // It is important to user array merge. Pushing is not enough
    $result = array_merge($result, patterns_export_actions_from_form($form_id, $term, 'term', PATTERNS_MODIFY));
  }
  return $result;
}