You are here

public function SearchApiViewsFacetsBlockDisplay::options_submit in Search API 7

Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.

Overrides views_plugin_display_block::options_submit

File

contrib/search_api_views/includes/display_facet_block.inc, line 78
Display plugin for displaying the search facets in a block.

Class

SearchApiViewsFacetsBlockDisplay
Plugin class for displaying search facets in a block.

Code

public function options_submit(&$form, &$form_state) {
  parent::options_submit($form, $form_state);
  switch ($form_state['section']) {
    case 'linked_path':
      $this
        ->set_option('linked_path', $form_state['values']['linked_path']);
      break;
    case 'facet_field':
      $this
        ->set_option('facet_field', $form_state['values']['facet_field']);
      break;
    case 'hide_block':
      $this
        ->set_option('hide_block', $form_state['values']['hide_block']);
      break;
  }
}