function taxonomy_csv_format_check_vocabulary in Taxonomy CSV import/export 6.5
Same name and namespace in other branches
- 6.2 taxonomy_csv.api.inc \taxonomy_csv_format_check_vocabulary()
- 6.3 taxonomy_csv.api.inc \taxonomy_csv_format_check_vocabulary()
- 6.4 taxonomy_csv.api.inc \taxonomy_csv_format_check_vocabulary()
Helper to check if a vocabulary has specific fields.
Parameters
$vid: Vocabulary id to check.
$format: (Optional) String. If set, check only only for this format.
Return value
Array of all formats of this specific vocabulary.
1 call to taxonomy_csv_format_check_vocabulary()
- taxonomy_csv_term_get_full in ./
taxonomy_csv.term.api.inc - Complete a base term object.
File
- ./
taxonomy_csv.api.inc, line 379 - Manage variables and features of module.
Code
function taxonomy_csv_format_check_vocabulary($vid, $format = '') {
$vocabulary_formats = array();
$formats = empty($format) ? taxonomy_csv_formats_get() : array(
$format,
);
foreach ($formats as $format) {
$funcname = "taxonomy_csv_vocabulary_check_{$format['format']}";
if (function_exists($funcname) && $funcname($vid)) {
$vocabulary_formats[] = $format['format'];
}
}
return $vocabulary_formats;
}