function WizardPluginBase::createView

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

Overrides WizardInterface::createView

File

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

Class

WizardPluginBase
Base class for Views wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

public function createView(array $form, FormStateInterface $form_state) {
    $view = $this->retrieveValidatedView($form, $form_state);
    if (empty($view)) {
        throw new WizardException('Attempted to create a view with values that have not been validated.');
    }
    return $view;
}

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