You are here

function party_primary_fields_source_table_pre_render in Party 7

Pre render callback for the party_primary_fields_source_table element.

1 string reference to 'party_primary_fields_source_table_pre_render'
PartyPrimaryFields::sourceForm in includes/party.primary_fields.inc
Set up a source form under the given element.

File

./party.admin.inc, line 227
Admin page callback file for the party module.

Code

function party_primary_fields_source_table_pre_render($element) {

  // Build our table rows.
  foreach (element_children($element) as $key) {
    $element['#rows'][$key] = array(
      'class' => array(
        'draggable',
      ),
    );
    foreach (array_keys($element['#header']) as $field) {
      $element['#rows'][$key]['data'][$field] = drupal_render($element[$key][$field]);
    }
  }
  return $element;
}