You are here

function mmenu_get_blocks in Mobile sliding menu 7

Same name and namespace in other branches
  1. 8 mmenu.module \mmenu_get_blocks()
  2. 7.3 mmenu.module \mmenu_get_blocks()
  3. 7.2 mmenu.module \mmenu_get_blocks()

Gets all Drupal blocks for assigning to a mmenu.

Return value

array An associative array contains all Drupal blocks.

1 call to mmenu_get_blocks()
mmenu_admin_settings_form in ./mmenu.admin.inc
Form constructor for the Mmenu settings form.

File

./mmenu.module, line 970
Primarily Drupal hooks and global API functions to manipulate mmenus.

Code

function mmenu_get_blocks() {
  $drupal_modules = module_list();
  $drupal_blocks = array();
  foreach ($drupal_modules as $drupal_module) {
    $array = module_invoke($drupal_module, 'block_info');
    if (!empty($array)) {
      $drupal_blocks[$drupal_module] = $array;
    }
  }
  return $drupal_blocks;
}