function hook_admin_menu_output_build

cis7 admin_menu.api.php hook_admin_menu_output_build(&$content)
cle7 admin_menu.api.php hook_admin_menu_output_build(&$content)
elmsmedia7 admin_menu.api.php hook_admin_menu_output_build(&$content)
icor7 admin_menu.api.php hook_admin_menu_output_build(&$content)
meedjum_blog7 admin_menu.api.php hook_admin_menu_output_build(&$content)
mooc7 admin_menu.api.php hook_admin_menu_output_build(&$content)

Add to the administration menu content before it is rendered.

Only use this hook to add new data to the menu structure. Use hook_admin_menu_output_alter() to *alter* existing data.


array $content: A structured array suitable for drupal_render(), potentially containing:

  • menu: The administrative menu of links below the path 'admin/*'.
  • icon: The icon menu.
  • account: The user account name and log out link.
  • users: The user counter.

Additionally, these special properties:

  • #components: The actual components contained in $content are configurable and depend on the 'admin_menu_components' configuration value. #components holds a copy of that for convenience.
  • #complete: A Boolean indicating whether the complete menu should be built, ignoring the current configuration in #components.

Passed by reference.

See also






2 functions implement hook_admin_menu_output_build()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

admin_menu_admin_menu_output_build in sites/all/modules/ulmus/admin_menu/admin_menu.module
Implements hook_admin_menu_output_build().
admin_menu_toolbar_admin_menu_output_build in sites/all/modules/ulmus/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module
Implements hook_admin_menu_output_build().
1 invocation of hook_admin_menu_output_build()
admin_menu_output in sites/all/modules/ulmus/admin_menu/admin_menu.module
Build the administration menu output.


sites/all/modules/ulmus/admin_menu/admin_menu.api.php, line 67
API documentation for Administration menu.


function hook_admin_menu_output_build(&$content) {
  // In case your implementation provides a configurable component, check
  // whether the component should be displayed:
  if (empty($content['#components']['shortcut.links']) && !$content['#complete']) {

  // Add new top-level item to the menu.
  if (isset($content['menu'])) {
    $content['menu']['myitem'] = array(
      '#title' => t('My item'),
      // #attributes are used for list items (LI).
      '#attributes' => array('class' => array('mymodule-myitem')),
      '#href' => 'mymodule/path',
      // #options are passed to l().
      '#options' => array(
        'query' => drupal_get_destination(),
        // Apply a class on the link (anchor).
        'attributes' => array('class' => array('myitem-link-anchor')),
      // #weight controls the order of links in the resulting item list.
      '#weight' => 50,
  // Add link to the icon menu to manually run cron.
  if (isset($content['icon'])) {
    $content['icon']['myitem']['cron'] = array(
      '#title' => t('Run cron'),
      '#access' => user_access('administer site configuration'),
      '#href' => 'admin/reports/status/run-cron',



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.