You are here

public function PurgePurgerBundleUI::get_form_list in Purge 7.2

Generates a list form.

1 call to PurgePurgerBundleUI::get_form_list()
PurgePurgerBundleUI::get_form in includes/purge_ui.class.inc
Generates a form form the current form settings.

File

includes/purge_ui.class.inc, line 81
Provides administrative interface for the Purge module.

Class

PurgePurgerBundleUI
Generates UI elements for the Purge UI module.

Code

public function get_form_list() {
  $form = array();

  // Check if we're just showing a single type.
  if (!is_null($this->item_type)) {
    $types = array(
      $item_type,
    );
  }
  else {
    $types = $this->item['type'];

    // Make sure purgers are displayed first.
    $types = array_diff($types, array(
      'purger',
      'type',
    ));
    array_unshift($types, 'purger');
  }

  // Loop through all types.
  foreach ($types as $type) {
    $form[$type] = $this
      ->get_form_list_type($type);
  }
  return $form;
}