theme_system_admin_by_module

Versions
5 – 6
theme_system_admin_by_module($menu_items)
7
theme_system_admin_by_module($variables)

Theme output of the dashboard page.

Code

modules/system/system.module, line 2347

<?php
function theme_system_admin_by_module($menu_items) {
  $stripe = 0;
  $output = '';
  $container = array();

  // Iterate over all modules
  foreach ($menu_items as $module => $block) {
    list($description, $items) = $block;

    // Output links
    if (count($items)) {
      $block = array();
      $block['title'] = $module;
      $block['content'] = theme('item_list', $items);
      $block['description'] = t($description);

      if ($block_output = theme('admin_block', $block)) {
        if (!$block['position']) {
          // Perform automatic striping.
          $block['position'] = ++$stripe % 2 ? 'left' : 'right';
        }
        $container[$block['position']] .= $block_output;
      }
    }
  }

  $output = '<div class="admin clear-block">';
  foreach ($container as $id => $data) {
    $output .= '<div class="'. $id .' clear-block">';
    $output .= $data;
    $output .= '</div>';
  }
  $output .= '</div>';

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.