function FormBuilderInterface::retrieveForm

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::retrieveForm()
  2. 10 core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::retrieveForm()
  3. 11.x core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::retrieveForm()

Retrieves the structured array that defines a given form.

Parameters

string $form_id: The unique string identifying the desired form. If a function with that name exists, it is called to build the form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form, including the additional arguments to self::getForm() or self::submitForm() in the 'args' component of the array.

Return value

mixed|\Symfony\Component\HttpFoundation\Response

1 method overrides FormBuilderInterface::retrieveForm()
FormBuilder::retrieveForm in core/lib/Drupal/Core/Form/FormBuilder.php
Retrieves the structured array that defines a given form.

File

core/lib/Drupal/Core/Form/FormBuilderInterface.php, line 199

Class

FormBuilderInterface
Provides an interface for form building and processing.

Namespace

Drupal\Core\Form

Code

public function retrieveForm($form_id, FormStateInterface &$form_state);

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