You are here

function regcode_admin_list in Registration codes 6

Same name and namespace in other branches
  1. 5.3 regcode_admin.inc.php \regcode_admin_list()
  2. 6.2 regcode.admin.php \regcode_admin_list()
  3. 7.2 regcode.admin.inc \regcode_admin_list()
  4. 7 regcode.admin.php \regcode_admin_list()

Return the code list page content with(in) the according filter form

Return value

The settings form.

1 string reference to 'regcode_admin_list'
regcode_menu in ./regcode.module
Implementation of hook_menu().

File

./regcode.admin.php, line 420
Functions and pages needed for the administration interface for the regcode module.

Code

function regcode_admin_list() {
  $form = array();

  // Pager heading text
  module_load_include('regcode.api', 'regcode', 'php');
  $visible = db_result(regcode_admin_list_getresource(true));
  $total = regcode_count();
  $form['filter'] = array(
    '#type' => 'fieldset',
    '#title' => t('Filter results: Showing @visible records out of @total', array(
      '@visible' => $visible,
      '@total' => $total,
    )),
    '#attributes' => array(
      'class' => 'container-inline',
    ),
  );

  // Load all of the available list filters
  regcode_admin_list_getfilters($form);

  // Load all of the available list actions
  regcode_admin_list_getactions($form);

  // Let other modules modify the form
  foreach (module_implements('regcode_filters') as $module) {
    $hook = $module . '_regcode_filters';
    $hook($form);
  }

  // Display the filtered list
  $form['list'] = array(
    '#value' => regcode_admin_list_getmarkup(),
  );
  return $form;
}