function SubformState::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Form/SubformState.php \Drupal\Core\Form\SubformState::__construct()
  2. 10 core/lib/Drupal/Core/Form/SubformState.php \Drupal\Core\Form\SubformState::__construct()
  3. 11.x core/lib/Drupal/Core/Form/SubformState.php \Drupal\Core\Form\SubformState::__construct()

Constructs a new instance.

Parameters

mixed[] $subform: The subform for which to create a form state.

mixed[] $parent_form: The subform's parent form.

\Drupal\Core\Form\FormStateInterface $parent_form_state: The parent form state.

File

core/lib/Drupal/Core/Form/SubformState.php, line 38

Class

SubformState
Stores information about the state of a subform.

Namespace

Drupal\Core\Form

Code

protected function __construct(array &$subform, array &$parent_form, FormStateInterface $parent_form_state) {
    $this->decoratedFormState = $parent_form_state;
    $this->parentForm = $parent_form;
    $this->subform = $subform;
}

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