function theme_tb_megamenu_admin_settings in The Better Mega Menu 7
File
- ./
tb_megamenu.admin.inc, line 21
Code
function theme_tb_megamenu_admin_settings($variables) {
$form = $variables['form'];
$rows = array();
foreach (element_children($form) as $key) {
if (isset($form[$key]['#tb_megamenu'])) {
$menu =& $form[$key];
$menu['enabled']['#parents'] = array(
$key,
'enabled',
);
$menu['enabled']['#name'] = $key . "[enabled]";
$row = array();
$row[] = drupal_render($menu['menu_name']);
$row[] = drupal_render($menu['title']);
$row[] = drupal_render($menu['config_megamenu']);
$row[] = drupal_render($menu['config_links']);
$rows[] = $row;
}
}
$header = array(
t('Menu Name'),
t('Menu Title'),
);
$header[] = array(
'data' => t('Operations'),
'colspan' => 2,
);
return theme('table', array(
'header' => $header,
'rows' => $rows,
'empty' => t('No MegaMenu block available. <a href="@link">Add MegaMenu Block</a>.', array(
'@link' => url('admin/config/user-interface/tb_megamenu/add'),
)),
'attributes' => array(
'id' => 'tb_megamenu',
),
)) . drupal_render_children($form);
}