public function WizardPluginBase::validateView

Implements Drupal\views\Plugin\views\wizard\WizardInterface::validate().

Instantiates the view from the form submission and validates its values.

Overrides WizardInterface::validateView

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php, line 1144
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 validateView(array $form, array &$form_state) {
  $view = $this
    ->instantiate_view($form, $form_state);
  $errors = $view
    ->get('executable')
    ->validate();
  if (!is_array($errors) || empty($errors)) {
    $this
      ->set_validated_view($form, $form_state, $view);
    return array();
  }
  return $errors;
}