You are here

function theme_key_ui_key_integrations_fieldset in Key 7

Returns HTML for the Integrations form.

Parameters

$variables: An associative array containing:

  • form: A render element representing the form.
1 theme call to theme_key_ui_key_integrations_fieldset()
key_ui_key_integration_form in modules/key_ui/includes/key_ui.admin.inc
Menu callback; displays the list of key integrations.

File

modules/key_ui/includes/key_ui.admin.inc, line 447
Administrative functionality for managing key configurations.

Code

function theme_key_ui_key_integrations_fieldset($variables) {
  $form = $variables['form'];

  // Individual table headers.
  $rows = array();

  // Iterate through all the integrations, which are
  // children of this fieldset.
  foreach (element_children($form) as $key) {
    $integration = $form[$key];
    $row = array();
    unset($integration['enabled']['#title']);
    $row[] = array(
      'class' => array(
        'checkbox',
      ),
      'data' => drupal_render($integration['enabled']),
    );
    $label = '<label';
    if (isset($integration['enabled']['#id'])) {
      $label .= ' for="' . $integration['enabled']['#id'] . '"';
    }
    $row[] = $label . '><strong>' . drupal_render($integration['name']) . '</strong></label>';
    $row[] = array(
      'data' => drupal_render($integration['description']),
      'class' => array(
        'integration-description',
      ),
    );
    $row[] = array(
      'data' => drupal_render($integration['module']),
      'class' => array(
        'integration-module',
      ),
    );
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $form['#header'],
    'rows' => $rows,
  ));
}