function taxonomy_xml_get_vocabulary_by_name in Taxonomy import/export via XML 7
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()
- 6 taxonomy_xml.module \taxonomy_xml_get_vocabulary_by_name()
Fetch a vocabulary by name.
Utility Func extending taxonomy.module
Parameters
string $name: Vocab name.
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.process.inc - Create Vocabulary definitions.
- _taxonomy_xml_get_vocabulary_placeholder in ./
taxonomy_xml.process.inc - Fetch the named vocab if it exists.
File
- ./
taxonomy_xml.module, line 720 - Make 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;
}
}
return NULL;
}