function taxonomy_facets_get_menu_tree in Taxonomy Facets 7.3
Same name and namespace in other branches
- 8 taxonomy_facets.module \taxonomy_facets_get_menu_tree()
- 7.2 taxonomy_facets.module \taxonomy_facets_get_menu_tree()
Print out menu tree for each vocab selected to be taxo faceted filter.
For each vocabulary id that is passed as an argument output menu tree. Array of menu tree is passed through the theme function at the end, so themed output is produced.
Parameters
integer $vid: Vocabulary id
Return value
string Themed menu tree.
1 call to taxonomy_facets_get_menu_tree()
- taxonomy_facets_block_view in ./
taxonomy_facets.module - Generate blocks with menu items used for filtering.
File
- ./
taxonomy_facets.module, line 354
Code
function taxonomy_facets_get_menu_tree($vid) {
$menu = new \taxonomyFacets\MenuTree($vid);
$menu_items = null;
$menu_tree = $menu
->getMenuTree();
foreach ($menu_tree as $item) {
if (is_string($item)) {
$menu_items .= $item;
}
else {
$menu_items .= theme('taxonomy_facets_menu_leaf_template', array(
'menuLeaf' => $item,
));
}
}
return $menu_items;
}