_book_admin_table_tree

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

modules/book/book.admin.inc, строка 171

Версии
5
_book_admin_table_tree($node, $depth)
6
_book_admin_table_tree($tree, &$form)

Recursive helper to build the main table in the book administration page form.

See also

book_admin_edit()

▾ 2 функции вызывают _book_admin_table_tree()

_book_admin_table in modules/book/book.admin.inc
Build the table portion of the form for the book administration page. See alsobook_admin_edit()
_book_admin_table_tree in modules/book/book.admin.inc
Recursive helper to build the main table in the book administration page form. See alsobook_admin_edit()

Код

<?php
function _book_admin_table_tree($tree, &$form) {
  foreach ($tree as $data) {
    $form['book-admin-'. $data['link']['nid']] = array(
      '#item' => $data['link'],
      'nid' => array('#type' => 'value', '#value' => $data['link']['nid']),
      'depth' => array('#type' => 'value', '#value' => $data['link']['depth']),
      'href' => array('#type' => 'value', '#value' => $data['link']['href']),
      'title' => array(
        '#type' => 'textfield',
        '#default_value' => $data['link']['link_title'],
        '#maxlength' => 255,
        '#size' => 40,
      ),
      'weight' => array(
        '#type' => 'weight',
        '#default_value' => $data['link']['weight'],
        '#delta' => 15,
      ),
      'plid' => array(
        '#type' => 'textfield',
        '#default_value' => $data['link']['plid'],
        '#size' => 6,
      ),
      'mlid' => array(
        '#type' => 'hidden',
        '#default_value' => $data['link']['mlid'],
      ),
    );
    if ($data['below']) {
      _book_admin_table_tree($data['below'], $form);
    }
  }

  return $form;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

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