You are here

public function OpenlayersObjects::list_form in Openlayers 7.3

Create the filter/sort form at the top of a list of exports.

This handles the very default conditions, and most lists are expected to override this and call through to parent::list_form() in order to get the base form and then modify it as necessary to add search gadgets for custom fields.

Overrides ctools_export_ui::list_form

File

modules/openlayers_ui/src/Plugin/export_ui/OpenlayersObjects.php, line 40
Class openlayers_objects_ui.

Class

OpenlayersObjects
Class openlayers_objects_ui.

Code

public function list_form(&$form, &$form_state) {
  parent::list_form($form, $form_state);
  $form['top row'] += $form['bottom row'];
  $form['filters'] = array(
    '#type' => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#title' => t('Filters'),
  );
  $form['filters']['top row'] = $form['top row'];
  unset($form['bottom row']);
  unset($form['top row']);
}