interface FormInterface

Provides an interface for a Form.

Hierarchy

Expanded class hierarchy of FormInterface

All classes that implement FormInterface

25 files declare their use of FormInterface
ActionAdminManageForm.php in drupal/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php
Contains \Drupal\action\Form\ActionAdminManageForm.
BanAdmin.php in drupal/core/modules/ban/lib/Drupal/ban/Form/BanAdmin.php
Contains \Drupal\ban\Form\BanAdmin.
BlockListController.php in drupal/core/modules/block/lib/Drupal/block/BlockListController.php
Contains \Drupal\block\BlockListController.
ConditionInterface.php in drupal/core/lib/Drupal/Core/Condition/ConditionInterface.php
Contains \Drupal\Core\Condition\ConditionInterface.
ConfigExportForm.php in drupal/core/modules/config/lib/Drupal/config/Form/ConfigExportForm.php

... See full list

File

drupal/core/lib/Drupal/Core/Form/FormInterface.php, line 13
Contains \Drupal\Core\Form\FormInterface.

Namespace

Drupal\Core\Form
View source
interface FormInterface {

  /**
   * Returns a unique string identifying the form.
   *
   * @return string
   *   The unique string identifying the form.
   */
  public function getFormID();

  /**
   * Form constructor.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param array $form_state
   *   An associative array containing the current state of the form.
   *
   * @return array
   *   The form structure.
   */
  public function buildForm(array $form, array &$form_state);

  /**
   * Form validation handler.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param array $form_state
   *   An associative array containing the current state of the form.
   */
  public function validateForm(array &$form, array &$form_state);

  /**
   * Form submission handler.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param array $form_state
   *   An associative array containing the current state of the form.
   */
  public function submitForm(array &$form, array &$form_state);

}

Members

Namesort descending Modifiers Type Description Overrides
FormInterface::buildForm public function Form constructor. 36
FormInterface::getFormID public function Returns a unique string identifying the form. 90
FormInterface::submitForm public function Form submission handler. 55
FormInterface::validateForm public function Form validation handler. 27