interface WizardInterface

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/wizard/WizardInterface.php \Drupal\views\Plugin\views\wizard\WizardInterface
  2. 8.9.x core/modules/views/src/Plugin/views/wizard/WizardInterface.php \Drupal\views\Plugin\views\wizard\WizardInterface
  3. 11.x core/modules/views/src/Plugin/views/wizard/WizardInterface.php \Drupal\views\Plugin\views\wizard\WizardInterface

Defines a common interface for Views Wizard plugins.

Hierarchy

Expanded class hierarchy of WizardInterface

All classes that implement WizardInterface

Related topics

2 files declare their use of WizardInterface
StylePluginBase.php in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Table.php in core/modules/views/src/Plugin/views/style/Table.php

File

core/modules/views/src/Plugin/views/wizard/WizardInterface.php, line 12

Namespace

Drupal\views\Plugin\views\wizard
View source
interface WizardInterface {
    
    /**
     * Form callback to build other elements in the "show" form.
     *
     * This method builds all form elements beside of the selection of the
     * base table.
     *
     * @param array $form
     *   The full wizard form array.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the wizard form.
     *
     * @return array
     *   Returns the changed wizard form.
     */
    public function buildForm(array $form, FormStateInterface $form_state);
    
    /**
     * Validate form and values.
     *
     * @param array $form
     *   The full wizard form array.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the wizard form.
     *
     * @return array
     *   An empty array if the view is valid; an array of error strings if it is
     *   not.
     */
    public function validateView(array $form, FormStateInterface $form_state);
    
    /**
     * Creates a view from values that have already been validated.
     *
     * @param array $form
     *   The full wizard form array.
     * @param \Drupal\Core\Form\FormStateInterface $form_state
     *   The current state of the wizard form.
     *
     * @return \Drupal\views\ViewEntityInterface
     *   The created view object.
     *
     * @throws \Drupal\views\Plugin\views\wizard\WizardException
     */
    public function createView(array $form, FormStateInterface $form_state);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
WizardInterface::buildForm public function Form callback to build other elements in the "show" form. 1
WizardInterface::createView public function Creates a view from values that have already been validated. 1
WizardInterface::validateView public function Validate form and values. 1

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