function theme_authcache_p13n_config_client_order in Authenticated User Page Caching (Authcache) 7.2
Returns HTML for a client order form.
Parameters
array $variables: An associative array containing:
- element: A render element representing the form.
Related topics
1 theme call to theme_authcache_p13n_config_client_order()
- authcache_p13n_process_config in modules/
authcache_p13n/ authcache_p13n.module - Form API process callback for config element.
File
- modules/
authcache_p13n/ authcache_p13n.module, line 1491 - Provides methods for serving personalized content fragments.
Code
function theme_authcache_p13n_config_client_order($variables) {
$element = $variables['element'];
// Client order (tabledrag).
$rows = array();
foreach (element_children($element, TRUE) as $name) {
$element[$name]['weight']['#attributes']['class'][] = 'clients-order-weight';
$rows[] = array(
'data' => array(
drupal_render($element[$name]['client']),
drupal_render($element[$name]['weight']),
),
'class' => array(
'draggable',
),
);
}
$id = empty($element['#tabledrag_id']) ? 'clients-order' : $element['#tabledrag_id'];
unset($element['#tabledrag_id']);
$output = drupal_render_children($element);
$output .= theme('table', array(
'rows' => $rows,
'attributes' => array(
'id' => $id,
'class' => 'clients-order-table',
),
));
drupal_add_tabledrag($id, 'order', 'sibling', 'clients-order-weight', NULL, NULL, TRUE);
return $output;
}