system_admin_menu_block

Versions
5
system_admin_menu_block($block)
6 – 7
system_admin_menu_block($item)

Provide a single block on the administration overview page.

▾ 3 functions call system_admin_menu_block()

system_admin_menu_block_page in modules/system/system.module
Provide a single block from the administration menu as a page. This function is often a destination for these blocks. For example, 'admin/content/types' needs to have a destination to be valid in the Drupal menu system, but too much...
system_main_admin_page in modules/system/system.module
Provide the administration overview page.
system_settings_overview in modules/system/system.module
Menu callback; displays a module's settings page.

Code

modules/system/system.module, line 387

<?php
function system_admin_menu_block($block) {
  $content = array();
  if (is_array($block['children'])) {
    usort($block['children'], '_menu_sort');
    foreach ($block['children'] as $mid) {
      $item = menu_get_item($mid);
      if (($item['type'] & MENU_VISIBLE_IN_TREE) && _menu_item_is_accessible($mid)) {
        $content[] = $item;
      }
    }
  }
  return $content;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.