You are here

function _taxonomy_menu_build_variable in Taxonomy menu 7

Same name and namespace in other branches
  1. 8 taxonomy_menu.module \_taxonomy_menu_build_variable()
  2. 6.2 taxonomy_menu.module \_taxonomy_menu_build_variable()
  3. 7.2 taxonomy_menu.module \_taxonomy_menu_build_variable()

Builds a variable from the supplied name and machine name of the vocabulary.

Parameters

string $name: Name to be added to the returned variable.

$vid: VID of the vocabulary from which the machine name will be taken.

Return value

bool|string

17 calls to _taxonomy_menu_build_variable()
taxonomy_menu_create_path in ./taxonomy_menu.module
Creates the path for the vid/tid combination.
taxonomy_menu_form_alter in ./taxonomy_menu.module
Implements hook_form_alter().
taxonomy_menu_overview_submit in ./taxonomy_menu.module
Submit handler, reacting on form ID: taxonomy_overview_terms.
taxonomy_menu_path_default in ./taxonomy_menu.module
Callback for hook_taxonomy_menu_path.
taxonomy_menu_taxonomy_vocabulary_delete in ./taxonomy_menu.module
Implements hook_taxonomy_vocabulary_delete().

... See full list

File

./taxonomy_menu.module, line 1110
Adds links to taxonomy terms into a menu.

Code

function _taxonomy_menu_build_variable($name, $vid) {
  $vocabulary = taxonomy_vocabulary_load($vid);
  if ($vocabulary) {
    return 'taxonomy_menu_' . $name . '_' . $vocabulary->machine_name;
  }
  else {
    return FALSE;
  }
}