You are here

function og_vocab_get_group in OG Vocabulary 6

API function; Get the group associated with a vocabulary.

Parameters

$vid: The vocabulary id.

8 calls to og_vocab_get_group()
og_vocab_determine_access in ./og_vocab.module
Access function to determine if a user has access to the menu item.
og_vocab_form_taxonomy_form_vocabulary_alter in ./og_vocab.module
Implementation of hook_form_FORM-ID_alter().
og_vocab_get_accessible_vocabs in ./og_vocab.module
API function; Get all the vocabs a user may access.
og_vocab_init in ./og_vocab.module
Implementation of hook_init().
og_vocab_service_get_group in ./og_vocab.services.inc
Service callback; Returns the group ID associated with a vocabulary ID.

... See full list

File

./og_vocab.module, line 453
Give each group its own system controlled vocabularies.

Code

function og_vocab_get_group($vid) {
  $nid = db_fetch_array(db_query("SELECT nid FROM {og_vocab} WHERE vid = %d", $vid));
  return !empty($nid) ? $nid : array();
}