You are here

function views_filters_selective_exposed_form_plugin::options_form in Views Hacks 6

Provide a form to edit options for this plugin.

Overrides views_plugin_exposed_form::options_form

File

views_filters_selective/views_filters_selective_exposed_form_plugin.inc, line 14

Class

views_filters_selective_exposed_form_plugin

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // Go through each filter and add the same options we used to add in hook_form_alter()
  foreach ($this->display->handler
    ->get_handlers('filter') as $label => $filter) {
    if (!$filter->options['exposed']) {
      continue;
    }
    $vfs_options[$label] = views_filters_selective_form_views_ui_config_item_form_alter_do($filter, $this->options['vfs'][$label], $this->view, 'edit-exposed-form-options-' . (isset($form['#type']) && $form['#type'] == 'fieldset' ? 'views-filters-selective-' : '') . 'vfs-' . str_replace('_', '-', $label) . '-vfs-selective', TRUE);
  }
  $form['vfs'] = $vfs_options;
}