Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WizardPluginBase.php

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

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

Class

WizardPluginBase
Base class for Views wizard plugins.

Namespace

Drupal\views\Plugin\views\wizard

Code

public function validateView(array $form, FormStateInterface $form_state) {
    $view = $this->instantiateView($form, $form_state);
    $errors = $view->getExecutable()
        ->validate();
    if (empty($errors)) {
        $this->setValidatedView($form, $form_state, $view);
    }
    return $errors;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal