You are here

function theme_devel_variable_form in Devel 6

File

./devel.module, line 1377

Code

function theme_devel_variable_form($form) {

  // TODO: this is not being called for some reason
  // die(form);
  $children = element_children($form['name']);
  foreach ($children as $key) {
    $rows[] = array(
      drupal_render($form['variables'][$key]),
      drupal_render($form['name'][$key]),
      drupal_render($form[$key]['value']),
      drupal_render($form[$key]['length']),
      drupal_render($form[$key]['edit']),
    );
  }
  $header = array(
    theme('table_select_header_cell'),
    array(
      'data' => t('Name'),
      'field' => 'name',
      'sort' => 'asc',
    ),
    array(
      'data' => t('Value'),
      'field' => 'value',
    ),
    array(
      'data' => t('Length'),
      'field' => 'length',
    ),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  $output = theme('table', $header, $rows);
  $output .= drupal_render($form);
  return $output;
}