You are here

function theme_user_relationship_implications_form_table in User Relationships 5.2

Same name and namespace in other branches
  1. 6 user_relationship_implications/user_relationship_implications.module \theme_user_relationship_implications_form_table()
  2. 7 user_relationship_implications/user_relationship_implications.module \theme_user_relationship_implications_form_table()

Theme function to create a table of checkboxes for the implications

1 theme call to theme_user_relationship_implications_form_table()
user_relationship_implications_form_alter in plugins/user_relationship_implications/user_relationship_implications.module
hook_form_alter()

File

plugins/user_relationship_implications/user_relationship_implications.module, line 395
Drupal Module: User Relationship Implications

Code

function theme_user_relationship_implications_form_table(&$form) {
  $headers = array(
    t('Relationship Type'),
    t('Strict'),
    t('Reverse'),
  );
  $rows = array();
  foreach ($form['opts'] as $rtid => $elements) {
    if (!is_numeric($rtid)) {
      continue;
    }
    $rows[$rtid] = array(
      drupal_render(array_shift($elements)),
      drupal_render(array_shift($elements)),
      drupal_render(array_shift($elements)),
    );
  }
  return theme('table', $headers, $rows);
}