You are here

function og_vocab_relation_get in OG Vocabulary 7

Get the group related to a vocabulary.

12 calls to og_vocab_relation_get()
OgVocab::delete in includes/og_vocab.og_vocab.inc
Overrides Entity::delete().
OgVocabMigrate::getTaxonomyFields in includes/migrate/og_vocab.migrate.inc
Helper function; Get the field names of term references in node entity.
og_vocab_form_alter in ./og_vocab.module
Implements hook_form_alter().
og_vocab_form_taxonomy_form_term_alter in ./og_vocab.module
Implements hook_form_FORM_ID_alter().
og_vocab_form_taxonomy_form_vocabulary_alter in ./og_vocab.module
Implements hook_form_FORM-ID_alter().

... See full list

File

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

Code

function og_vocab_relation_get($vid) {
  $cache = drupal_static(__FUNCTION__, array());
  if (!isset($cache[$vid])) {
    $cache[$vid] = db_select('og_vocab_relation', 'ogr')
      ->fields('ogr')
      ->condition('vid', $vid)
      ->execute()
      ->fetch();
  }
  return $cache[$vid];
}