You are here

public function FormState::setFormObject in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::setFormObject()

Sets the form object that is responsible for building this form.

Parameters

\Drupal\Core\Form\FormInterface $form_object: The form object.

Return value

$this

Overrides FormStateInterface::setFormObject

File

core/lib/Drupal/Core/Form/FormState.php, line 1157

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

public function setFormObject(FormInterface $form_object) {
  $this
    ->addBuildInfo('callback_object', $form_object);
  return $this;
}