function _drush_taxonomy_edge_get_vid in Taxonomy Edge 7
Get vocabulary id by machine name.
Parameters
string $name: The vocabulary machine name.
Return value
integer The vocabulary ID, FALSE if not found.
2 calls to _drush_taxonomy_edge_get_vid()
- drush_taxonomy_edge_rebuild_edges in ./
taxonomy_edge.drush.inc - Rebuild edges.
- drush_taxonomy_edge_rebuild_order in ./
taxonomy_edge.drush.inc - Rebuild order.
File
- ./
taxonomy_edge.drush.inc, line 60 - Drush commands for Taxonomy Edge.
Code
function _drush_taxonomy_edge_get_vid($name) {
$vocabulary = taxonomy_vocabulary_machine_name_load($name);
if (!$vocabulary) {
return drush_set_error(dt('Vocabulary: !name not found!.', array(
'!name' => $name,
)));
}
$vid = $vocabulary->vid;
return $vid;
}