| 7 system.module | system_block_info() |
| 8 system.module | system_block_info() |
Implements hook_block_info().
File
- modules/
system/ system.module, line 2021 - 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,
);
$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,
);
// 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;
}
Login or register to post comments