1 system.module system_block_info()

Implements hook_block_info().

File

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

Code

function system_block_info() {
  $blocks['main'] = array(
    'info' => t('Main page content'),
    'description' => t('The default content for this page. <strong>This block may be required for this page to work properly.</strong>'),
    'required contexts' => array(
      'overrides_path' => 'overrides_path',
    ),
    'render first' => TRUE,
  );
  $blocks['header'] = array(
    'info' => t('Header block'),
    'description' => t('Contains elements typical of a site header including the site logo, name, slogan, and optionally a navigational menu.'),
  );
  $blocks['breadcrumb'] = array(
    'info' => t('Breadcrumb'),
    'description' => t('A trail of links from the homepage to the current page.'),
    'render last' => TRUE,
  );
  $blocks['powered-by'] = array(
    'info' => t('Powered by Backdrop'),
    'description' => t('Displays a link to <a href="https://backdropcms.org">the Backdrop CMS website</a>.'),
    'weight' => '10',
  );
  $blocks['page_components'] = array(
    'info' => t('Page components'),
    'description' => t('Displays the page title, local task tabs, local actions links, and messages.'),
    'class' => 'PageComponents',
    'render last' => TRUE,
  );
  // System-defined menu blocks. Load customizations from Menu module.
  $all_menus = function_exists('menu_get_menus') ? menu_get_menus() : array();
  foreach (menu_list_system_menus() as $menu_name => $title) {
    $custom_title = isset($all_menus[$menu_name]) ? $all_menus[$menu_name] : $title;
    $blocks[$menu_name] = array(
      // Names from menu_list_system_menus() need to be translated through t().
      'info' => check_plain(t($custom_title)),
      'description' => t('A list of links for the menu: %title.', array('%title' => t($custom_title))),
    );
  }
  return $blocks;
}