You are here

function tb_megamenu_render_block in The Better Mega Menu 7

2 calls to tb_megamenu_render_block()
tb_megamenu_request in ./tb_megamenu.ajax.inc
template_preprocess_tb_megamenu_backend in ./tb_megamenu.themes.inc

File

./tb_megamenu.functions.inc, line 482

Code

function tb_megamenu_render_block($delta = 0) {
  global $tb_elements_counter;
  $tb_elements_counter = array(
    'column' => 0,
  );
  $block = array(
    'content' => array(
      '#type' => 'markup',
      '#markup' => theme('tb_megamenu', array(
        'menu_name' => $delta,
        'section' => 'backend',
      )),
    ),
  );
  drupal_add_js('Drupal.TBMegaMenu = Drupal.TBMegaMenu || {};', array(
    'type' => 'inline',
  ));
  drupal_add_js('Drupal.TBMegaMenu.TBElementsCounter = ' . json_encode($tb_elements_counter), array(
    'type' => 'inline',
  ));
  drupal_add_js('Drupal.TBMegaMenu.TBElementsCounter = ' . json_encode($tb_elements_counter), array(
    'type' => 'inline',
  ));
  return $block;
}