You are here

function group_member_overview_form in Group 7

Builds the group member overview form.

@todo Dynamic pager amount.

1 string reference to 'group_member_overview_form'
GroupMembershipUIController::hook_menu in classes/group_membership.ui_controller.inc
Provides definitions for implementing hook_menu().

File

admin/group_membership.inc, line 14
Group membership overview admin UI.

Code

function group_member_overview_form($form, &$form_state, Group $group) {

  // If the form was rebuilt from an operation, we show that form instead.
  if ($form_state['rebuild']) {
    $args = array_merge(array(
      $form,
      &$form_state,
    ), $form_state['rebuild_info']['args']);
    return call_user_func_array($form_state['rebuild_info']['callback'], $args);
  }

  // The primary submit handler for this form is the filter.
  $form['#submit'] = array(
    'group_member_filters_form_submit',
  );

  // Build the overview form with filters and bulk operations.
  $form['filters'] = group_member_filters_form($group);
  $form['options'] = group_member_options_form($group);
  $form['members'] = group_members_form($group, 20);
  $form['pager'] = array(
    '#markup' => theme('pager'),
  );
  return $form;
}