You are here

function tb_megamenu_get_blocks_info in The Better Mega Menu 7

1 call to tb_megamenu_get_blocks_info()
tb_megamenu_load_block in ./tb_megamenu.functions.inc

File

./tb_megamenu.functions.inc, line 66

Code

function tb_megamenu_get_blocks_info() {
  static $_blocks_array = array();
  if (empty($_blocks_array)) {
    $blocks = db_select('block', 'b')
      ->fields('b')
      ->execute()
      ->fetchAll();
    $_blocks_array = array();
    foreach ($blocks as $block) {
      if ($block->module != 'tb_megamenu') {
        $_blocks_array[$block->module . '--' . $block->delta] = $block;
      }
    }
  }
  return $_blocks_array;
}