menu_overview_tree

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/menu/menu.module, строка 608

Версии
5
menu_overview_tree()

Present the menu tree, rendered along with links to edit menu items.

Код

<?php
function menu_overview_tree() {
  $menu = menu_get_menu();
  $root_menus = menu_get_root_menus();
  $header = array(t('Menu item'), t('Expanded'), array('data' => t('Operations'), 'colspan' => '3'));
  $output = '';

  // We reverse the root menu to show user created menus first.
  foreach (array_reverse($root_menus, true) as $mid => $title) {
    $operations = array();
    if ($menu['items'][$mid]['type'] & MENU_MODIFIABLE_BY_ADMIN) {
      $operations[] = l(t('Edit'), 'admin/build/menu/menu/edit/'. $mid);
    }
    if ($menu['items'][$mid]['type'] & MENU_CREATED_BY_ADMIN) {
      $operations[] = l(t('Delete'), 'admin/build/menu/menu/delete/'. $mid);
    }
    $operations[] = l(t('Add item'), 'admin/build/menu/item/add/'. $mid);
    $table = theme('item_list', $operations);

    $rows = menu_overview_tree_rows($mid);
    $table .= theme('table', $header, $rows ? $rows : array(array(array('data' => t('No menu items defined.'), 'colspan' => 5))));

    $output .= theme('box', check_plain($title), $table);
  }
  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему