public function WizardPluginBase::createView

Creates a view from values that have already been validated.

Parameters

array $form: The full wizard form array.

array $form_state: The current state of the wizard form.

Return value

Drupal\views\ViewExecutable The created view object.

Throws

Drupal\views\Plugin\views\wizard\WizardException

Overrides WizardInterface::createView

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php, line 1166
Definition of Drupal\views\Plugin\views\wizard\WizardPluginBase.

Class

WizardPluginBase
Provides the interface and base class for Views Wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

public function createView(array $form, array &$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;
}