function system_block_info

system_block_info()

Implements hook_block_info().

File

modules/system/system.module, line 2041
Configuration system that lets administrators modify the workings of the site.

Code

function system_block_info() {
  $blocks['main'] = array(
    'info' => t('Main page content'),
    // Cached elsewhere.
    'cache' => DRUPAL_NO_CACHE,
    // Auto-enable in 'content' region by default, which always exists.
    // @see system_themes_page(), drupal_render_page()
    'status' => 1,
    'region' => 'content',
  );
  $blocks['powered-by'] = array(
    'info' => t('Powered by Drupal'),
    'weight' => '10',
    'cache' => DRUPAL_NO_CACHE,
  );
  $blocks['help'] = array(
    'info' => t('System help'),
    'weight' => '5',
    'cache' => DRUPAL_NO_CACHE,
    // Auto-enable in 'help' region by default, if the theme defines one.
    'status' => 1,
    'region' => 'help',
  );
  // System-defined menu blocks.
  foreach (menu_list_system_menus() as $menu_name => $title) {
    $blocks[$menu_name]['info'] = t($title);
    // Menu blocks can't be cached because each menu item can have
    // a custom access callback. menu.inc manages its own caching.
    $blocks[$menu_name]['cache'] = DRUPAL_NO_CACHE;
  }
  return $blocks;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_block_info/7.x