function theme_crumbs_weights_tabledrag in Crumbs, the Breadcrumbs suite 7.2
Theme callback for form elements with "#type" = "crumbs_weights_tabledrag".
Parameters
array &$vars:
Return value
string Rendered HTML
1 theme call to theme_crumbs_weights_tabledrag()
- crumbs_element_info in ./
crumbs.form.inc - Implements hook_element_info()
File
- admin/
crumbs.tabledrag.inc, line 10
Code
function theme_crumbs_weights_tabledrag(&$vars) {
$element = $vars['element'];
$table = new crumbs_Admin_WeightsTable($element['#crumbs_plugin_info']);
foreach (element_children($element) as $key) {
$child = $element[$key];
$table
->addElement($key, $child);
}
$rows = $table
->getRows();
drupal_add_tabledrag('crumbs_weights_tabledrag', 'order', 'sibling', 'crumbs-weight-element');
return theme('table', array(
'rows' => $rows,
'attributes' => array(
'id' => 'crumbs_weights_tabledrag',
),
));
}