function FormBuilder::getForm

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

Overrides FormBuilderInterface::getForm

File

core/lib/Drupal/Core/Form/FormBuilder.php, line 211

Class

FormBuilder
Provides form building and processing.

Namespace

Drupal\Core\Form

Code

public function getForm($form_arg) {
    $form_state = new FormState();
    $args = func_get_args();
    // Remove $form_arg from the arguments.
    unset($args[0]);
    $form_state->addBuildInfo('args', array_values($args));
    return $this->buildForm($form_arg, $form_state);
}

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