You are here

function tb_megamenu_get_menu in The Better Mega Menu 7

2 calls to tb_megamenu_get_menu()
tb_megamenu_get_block_config in ./tb_megamenu.functions.inc
tb_megamenu_get_menu_config in ./tb_megamenu.functions.inc

File

./tb_megamenu.functions.inc, line 127

Code

function tb_megamenu_get_menu($menu_name) {
  global $language;
  $query = db_select('menu_custom', 'm');
  $query
    ->leftJoin('tb_megamenus', 't', 't.menu_name = m.menu_name');
  $query
    ->fields('m');
  $query
    ->addField('t', 'menu_config');
  $query
    ->addField('t', 'block_config');
  $query
    ->condition('m.menu_name', $menu_name);
  $query
    ->condition('t.language', $language->language);
  return $query
    ->execute()
    ->fetchObject();
}