system_admin_menu_block

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 system_admin_menu_block($item)

Provide a single block on the administration overview page.

Übergabeparameter

$item The menu item to be displayed.

▾ 5 functions call system_admin_menu_block()

node_add_page in modules/node/node.pages.inc
system_admin_menu_block_page in modules/system/system.admin.inc
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_logging_overview in modules/system/system.admin.inc
Menu callback; Menu page for the various logging options.
system_main_admin_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
system_settings_overview in modules/system/system.admin.inc
Menu callback; displays a module's settings page.

Code

modules/system/system.module, line 624

<?php
function system_admin_menu_block($item) {
  $content = array();
  if (!isset($item['mlid'])) {
    $item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path']));
  }
  $result = db_query("
    SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*
    FROM {menu_links} ml
    LEFT JOIN {menu_router} m ON ml.router_path = m.path
    WHERE ml.plid = %d AND ml.menu_name = '%s' AND hidden = 0", $item['mlid'], $item['menu_name']);
  while ($item = db_fetch_array($result)) {
    _menu_link_translate($item);
    if (!$item['access']) {
      continue;
    }
    // The link 'description' either derived from the hook_menu 'description' or
    // entered by the user via menu module is saved as the title attribute.
    if (!empty($item['localized_options']['attributes']['title'])) {
      $item['description'] = $item['localized_options']['attributes']['title'];
    }
    // Prepare for sorting as in function _menu_tree_check_access().
    // The weight is offset so it is always positive, with a uniform 5-digits.
    $content[(50000 + $item['weight']) . ' ' . drupal_strtolower($item['title']) . ' ' . $item['mlid']] = $item;
  }
  ksort($content);
  return $content;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen