You are here

public function Serializer::submitOptionsForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::submitOptionsForm()

Handle any special handling on the validate form.

Overrides PluginBase::submitOptionsForm

File

core/modules/rest/src/Plugin/views/style/Serializer.php, line 107
Contains \Drupal\rest\Plugin\views\style\Serializer.

Class

Serializer
The style plugin for serialized output formats.

Namespace

Drupal\rest\Plugin\views\style

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
  parent::submitOptionsForm($form, $form_state);
  $formats = $form_state
    ->getValue(array(
    'style_options',
    'formats',
  ));
  $form_state
    ->setValue(array(
    'style_options',
    'formats',
  ), array_filter($formats));
}