You are here

function template_preprocess_spaces_features_form in Spaces 7

Same name and namespace in other branches
  1. 7.3 theme/theme.inc \template_preprocess_spaces_features_form()

Preprocessor for theme('spaces_features_form').

File

theme/theme.inc, line 6

Code

function template_preprocess_spaces_features_form(&$vars) {
  $form =& $vars['form'];
  drupal_add_css(drupal_get_path('module', 'spaces') . '/spaces.css');
  $rows = array();
  foreach (element_children($form['spaces_features']) as $feature) {
    $rows[] = array(
      array(
        'class' => 'label',
        'data' => $form['labels'][$feature],
      ),
      array(
        'class' => 'option',
        'data' => $form['spaces_features'][$feature],
      ),
      array(
        'class' => 'actions',
        'data' => $form['settings'][$feature],
      ),
    );
  }
  $table = array(
    'header' => array(),
    'rows' => $rows,
    'attributes' => array(
      'class' => 'spaces',
    ),
  );
  $vars['features'] = theme('table', $table);
  unset($form['labels']);
  unset($form['spaces_features']);
  unset($form['settings']);
}