You are here

function theme_cacheflush_advanced_form_table in CacheFlush 7

Same name and namespace in other branches
  1. 7.3 modules/cacheflush_advanced/cacheflush_advanced.module \theme_cacheflush_advanced_form_table()
  2. 7.2 cacheflush_advanced/cacheflush_advanced.module \theme_cacheflush_advanced_form_table()

Theme cacheflush table for advanced preset.

Parameters

array $variables: Theme variables.

Return value

array Table theme.

1 theme call to theme_cacheflush_advanced_form_table()
cacheflush_advanced_form_alter in cacheflush_advanced/cacheflush_advanced.module
Implements hook_form_alter().

File

cacheflush_advanced/cacheflush_advanced.module, line 149
Cacheflush advanced preset form.

Code

function theme_cacheflush_advanced_form_table($variables) {
  $form = $variables['form'];
  $rows = array();
  foreach (element_children($form) as $key) {
    $rows[$key] = array(
      'data' => array(
        drupal_render($form[$key]['cid']),
        drupal_render($form[$key]['table']),
        drupal_render($form[$key]['wildcard']),
        drupal_render($form[$key]['operations']),
      ),
    );
  }
  $headers = array(
    t('Cache ID'),
    t('Table'),
    t('Wildcard'),
    t('Operations'),
  );
  return theme('table', array(
    'header' => $headers,
    'rows' => $rows,
  ));
}