function taxonomy_xml_get_vocabulary_by_name in Taxonomy import/export via XML 6
Same name and namespace in other branches
- 5.2 taxonomy_xml.module \taxonomy_xml_get_vocabulary_by_name()
- 5 taxonomy_xml.module \taxonomy_xml_get_vocabulary_by_name()
- 6.2 taxonomy_xml.module \taxonomy_xml_get_vocabulary_by_name()
- 7 taxonomy_xml.module \taxonomy_xml_get_vocabulary_by_name()
Fetch a vocabulary by name. Utility Func extending taxonomy.module
Return value
Vocabulary object. NULL if not found
2 calls to taxonomy_xml_get_vocabulary_by_name()
- taxonomy_xml_absorb_vocabulary_definitions in ./
taxonomy_xml.module - Use the vocabs defined as resources in the input to find or create vocabulary definitions.
- _taxonomy_xml_get_vocabulary_placeholder in ./
taxonomy_xml.module - Either fetch the named vocab if it exists, or create and return a useful placeholder.
File
- ./
taxonomy_xml.module, line 1097 - taxonomy_xml.module This module makes it possible to import and export taxonomies as XML documents.
Code
function taxonomy_xml_get_vocabulary_by_name($name) {
$vs = taxonomy_get_vocabularies();
foreach ($vs as $voc) {
if ($voc->name == $name) {
return $voc;
}
}
}