You are here

public function DataExport::submitOptionsForm in Views data export 8

Same name in this branch
  1. 8 src/Plugin/views/display/DataExport.php \Drupal\views_data_export\Plugin\views\display\DataExport::submitOptionsForm()
  2. 8 src/Plugin/views/style/DataExport.php \Drupal\views_data_export\Plugin\views\style\DataExport::submitOptionsForm()

Handle any special handling on the validate form.

Overrides Serializer::submitOptionsForm

File

src/Plugin/views/style/DataExport.php, line 147

Class

DataExport
A style plugin for data export views.

Namespace

Drupal\views_data_export\Plugin\views\style

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {

  // Transform the formats back into an array.
  $format = $form_state
    ->getValue([
    'style_options',
    'formats',
  ]);
  $form_state
    ->setValue([
    'style_options',
    'formats',
  ], [
    $format => $format,
  ]);
  parent::submitOptionsForm($form, $form_state);
}