public function WizardPluginBase::createView in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php \Drupal\views\Plugin\views\wizard\WizardPluginBase::createView()
Creates a view from values that have already been validated.
Parameters
array $form: The full wizard form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the wizard form.
Return value
\Drupal\views\ViewEntityInterface The created view object.
Throws
\Drupal\views\Plugin\views\wizard\WizardException
Overrides WizardInterface::createView
File
- core/
modules/ views/ src/ Plugin/ views/ wizard/ WizardPluginBase.php, line 1254 - Contains \Drupal\views\Plugin\views\wizard\WizardPluginBase.
Class
- WizardPluginBase
- Base class for Views wizard plugins.
Namespace
Drupal\views\Plugin\views\wizardCode
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;
}