You are here

interface ViewsFormInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views_ui/src/Form/Ajax/ViewsFormInterface.php \Drupal\views_ui\Form\Ajax\ViewsFormInterface

Hierarchy

Expanded class hierarchy of ViewsFormInterface

All classes that implement ViewsFormInterface

1 file declares its use of ViewsFormInterface
claro.theme in core/themes/claro/claro.theme
Functions to support theming in the Claro theme.

File

core/modules/views_ui/src/Form/Ajax/ViewsFormInterface.php, line 8

Namespace

Drupal\views_ui\Form\Ajax
View source
interface ViewsFormInterface extends FormInterface {

  /**
   * Returns the key that represents this form.
   *
   * @return string
   *   The form key used in the URL, e.g., the string 'add-handler' in
   *   'admin/structure/views/%/add-handler/%/%/%'.
   */
  public function getFormKey();

  /**
   * Gets the form state for this form.
   *
   * @param \Drupal\views\ViewEntityInterface $view
   *   The view being edited.
   * @param string|null $display_id
   *   The display ID being edited, or NULL to load the first available display.
   * @param string $js
   *   If this is an AJAX form, it will be the string 'ajax'. Otherwise, it will
   *   be 'nojs'. This determines the response.
   *
   * @return \Drupal\Core\Form\FormStateInterface
   *   The current state of the form.
   */
  public function getFormState(ViewEntityInterface $view, $display_id, $js);

  /**
   * Creates a new instance of this form.
   *
   * @param \Drupal\views\ViewEntityInterface $view
   *   The view being edited.
   * @param string|null $display_id
   *   The display ID being edited, or NULL to load the first available display.
   * @param string $js
   *   If this is an AJAX form, it will be the string 'ajax'. Otherwise, it will
   *   be 'nojs'. This determines the response.
   *
   * @return array
   *   A form for a specific operation in the Views UI, or an array of AJAX
   *   commands to render a form.
   *
   * @todo When https://www.drupal.org/node/1843224 is in, this will return
   *   \Drupal\Core\Ajax\AjaxResponse instead of the array of AJAX commands.
   */
  public function getForm(ViewEntityInterface $view, $display_id, $js);

}

Members

Namesort descending Modifiers Type Description Overrides
FormInterface::buildForm public function Form constructor. 192
FormInterface::getFormId public function Returns a unique string identifying the form. 264
FormInterface::submitForm public function Form submission handler. 214
FormInterface::validateForm public function Form validation handler. 32
ViewsFormInterface::getForm public function Creates a new instance of this form. 1
ViewsFormInterface::getFormKey public function Returns the key that represents this form. 10
ViewsFormInterface::getFormState public function Gets the form state for this form. 1