function WizardPluginBase::alterDisplayOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::alterDisplayOptions()
  2. 8.9.x core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::alterDisplayOptions()
  3. 10 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::alterDisplayOptions()

Alters the full array of display options before they are added to the view.

1 call to WizardPluginBase::alterDisplayOptions()
WizardPluginBase::instantiateView in core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php
Instantiates a view object from form values.

File

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

Class

WizardPluginBase
Base class for Views wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

protected function alterDisplayOptions(&$display_options, $form, FormStateInterface $form_state) {
    foreach ($display_options as $display_type => $options) {
        // Allow style plugins to hook in and provide some settings.
        $style_plugin = Views::pluginManager('style')->createInstance($options['style']['type']);
        $style_plugin->wizardSubmit($form, $form_state, $this, $display_options, $display_type);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.