3 namespace Drupal\Core\Form;
6 * Provides an interface for a Form.
10 interface FormInterface {
13 * Returns a unique string identifying the form.
16 * The unique string identifying the form.
18 public function getFormId();
24 * An associative array containing the structure of the form.
25 * @param \Drupal\Core\Form\FormStateInterface $form_state
26 * The current state of the form.
31 public function buildForm(array $form, FormStateInterface $form_state);
34 * Form validation handler.
37 * An associative array containing the structure of the form.
38 * @param \Drupal\Core\Form\FormStateInterface $form_state
39 * The current state of the form.
41 public function validateForm(array &$form, FormStateInterface $form_state);
44 * Form submission handler.
47 * An associative array containing the structure of the form.
48 * @param \Drupal\Core\Form\FormStateInterface $form_state
49 * The current state of the form.
51 public function submitForm(array &$form, FormStateInterface $form_state);