Projet

Général

Profil

Paste
Télécharger (785 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / sweaver / sweaver_plugin.theme.inc @ 87dbc3bf

1
<?php
2

    
3
/**
4
 * @file
5
 * Sweaver theming functions.
6
 */
7

    
8
/**
9
 * Plugins drag and drop configuration screen.
10
 */
11
function template_preprocess_sweaver_plugin_config_plugins(&$vars) {
12
  $form = &$vars['form'];
13
  $rows = array();
14

    
15
  asort($form['#plugins']);
16
  foreach ($form['#plugins'] as $plugin => $weight) {
17
    $row = new stdClass;
18
    $row->name = drupal_render($form[$plugin]['name']);
19
    $row->status = drupal_render($form[$plugin]['status']);
20
    $row->weight = drupal_render($form[$plugin]['weight']);
21
    $rows[] = $row;
22
  }
23

    
24
  drupal_add_js('misc/tableheader.js');
25
  drupal_add_tabledrag('plugins-configuration', 'order', 'sibling', 'plugin-weight', NULL, NULL, TRUE);
26

    
27
  $vars['rows'] = $rows;
28
  $vars['submit'] = drupal_render_children($form);
29
}