You are here

function _taxonomy_menu_get_terms in Taxonomy menu 7

Same name and namespace in other branches
  1. 6.3 taxonomy_menu.database.inc \_taxonomy_menu_get_terms()
  2. 6.2 taxonomy_menu.database.inc \_taxonomy_menu_get_terms()

Gets all taxonomy terms for a given vocabulary.

Parameters

int $vid: Vocabulary ID.

Return value

array Array of taxonomy term IDs.

1 call to _taxonomy_menu_get_terms()
taxonomy_menu_path_default in ./taxonomy_menu.module
Callback for hook_taxonomy_menu_path.

File

./taxonomy_menu.database.inc, line 151
Database functions

Code

function _taxonomy_menu_get_terms($vid) {
  $result = db_select('taxonomy_term_data', 'td')
    ->condition('vid', $vid)
    ->fields('td', array(
    'tid',
  ))
    ->execute();
  return $result
    ->fetchAll();
}