function admin_menu_toolbar_page_build

cis7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)
cle7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)
elmsmedia7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)
icor7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)
meedjum_blog7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)
mooc7 admin_menu_toolbar.module admin_menu_toolbar_page_build(&$page)

Implementation of hook_page_build().

File

sites/all/modules/ulmus/admin_menu/admin_menu_toolbar/admin_menu_toolbar.module, line 24
Renders Administration menu like Toolbar (core) module.

Code

function admin_menu_toolbar_page_build(&$page) {
  if (!isset($page['page_bottom']['admin_menu'])) {
    return;
  }
  $path = drupal_get_path('module', 'admin_menu_toolbar');
  $attached = &$page['page_bottom']['admin_menu']['#attached'];
  $options = array('every_page' => TRUE);

  $attached['css'][$path . '/admin_menu_toolbar.css'] = $options;
  $attached['js'][$path . '/admin_menu_toolbar.js'] = $options;

  // @todo Stop-gap fix until cached rendering is resolved.
  // @see http://drupal.org/node/1567622
  if (module_exists('shortcut')) {
    $attached['css'][drupal_get_path('module', 'shortcut') . '/shortcut.css'] = $options;
  }

  $settings = array();
  // Add current path to support menu item highlighting.
  // @todo Compile real active trail here?
  $args = explode('/', $_GET['q']);
  if ($args[0] == 'admin' && !empty($args[1])) {
    $settings['activeTrail'] = url($args[0] . '/' . $args[1]);
  }
  elseif (drupal_is_front_page()) {
    $settings['activeTrail'] = url('<front>');
  }

  $attached['js'][] = array(
    'data' => array('admin_menu' => array('toolbar' => $settings)),
    'type' => 'setting',
  );
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.