You are here

sweaver_plugin.theme.inc in Sweaver 6

Same filename and directory in other branches
  1. 7 sweaver_plugin.theme.inc

Sweaver theming functions.

File

sweaver_plugin.theme.inc
View source
<?php

/**
 * @file
 * Sweaver theming functions.
 */

/**
 * Plugins drag and drop configuration screen.
 */
function template_preprocess_sweaver_plugin_config_plugins(&$vars) {
  $form =& $vars['form'];
  $rows = array();
  asort($form['#plugins']);
  foreach ($form['#plugins'] as $plugin => $weight) {
    $row = new stdClass();
    $row->name = drupal_render($form[$plugin]['name']);
    $row->status = drupal_render($form[$plugin]['status']);
    $row->weight = drupal_render($form[$plugin]['weight']);
    $rows[] = $row;
  }
  drupal_add_js('misc/tableheader.js');
  drupal_add_tabledrag('plugins-configuration', 'order', 'sibling', 'plugin-weight', NULL, NULL, TRUE);
  $vars['rows'] = $rows;
  $vars['submit'] = drupal_render($form);
}

Functions

Namesort descending Description
template_preprocess_sweaver_plugin_config_plugins Plugins drag and drop configuration screen.