Contains \Drupal\Core\Form\FormInterface.
<?php
/**
* @file
* Contains \Drupal\Core\Form\FormInterface.
*/
namespace Drupal\Core\Form;
/**
* Provides an interface for a Form.
*/
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);
}
Name | Description |
---|---|
FormInterface | Provides an interface for a Form. |