You are here

protected function WizardPluginBase::restExportDisplayOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::restExportDisplayOptions()
  2. 10 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::restExportDisplayOptions()

Retrieves the REST export display options from the submitted form values.

Parameters

array $form: The full wizard form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the wizard form.

Return value

array Returns an array of display options.

1 call to WizardPluginBase::restExportDisplayOptions()
WizardPluginBase::buildDisplayOptions in core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
Builds an array of display options for the view.

File

core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php, line 1137

Class

WizardPluginBase
Base class for Views wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

protected function restExportDisplayOptions(array $form, FormStateInterface $form_state) {
  $display_options = [];
  $display_options['path'] = $form_state
    ->getValue([
    'rest_export',
    'path',
  ]);
  $display_options['style'] = [
    'type' => 'serializer',
  ];
  return $display_options;
}