function taxonomy_manager_export_csv in Taxonomy Manager 6.2
Same name and namespace in other branches
- 5 taxonomy_manager.module \taxonomy_manager_export_csv()
- 6 taxonomy_manager.admin.inc \taxonomy_manager_export_csv()
- 7 taxonomy_manager.admin.inc \taxonomy_manager_export_csv()
Generates the CVS Ouput
1 call to taxonomy_manager_export_csv()
- taxonomy_manager_export in ./
taxonomy_manager.admin.inc - AJAX Callback that returns the CSV Output
File
- ./
taxonomy_manager.admin.inc, line 2397 - Taxonomy Manager Admin
Code
function taxonomy_manager_export_csv($delimiter = ";", $vid, $selected_tid = 0, $depth = NULL, $options = array()) {
$tree = taxonomy_manager_export_get_tree($vid, $selected_tid, $depth, $options);
foreach ($tree as $term) {
$array = array();
$array[] = '"' . $term->vid . '"';
$array[] = '"' . $term->tid . '"';
$array[] = '"' . $term->name . '"';
$array[] = '"' . $term->description . '"';
foreach ($term->parents as $parent) {
$array[] = '"' . $parent . '"';
}
$output .= implode($delimiter, $array) . "\n";
}
return $output;
}