function SubformState::createForSubform

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

Creates a new instance for a subform.

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.

Return value

static

44 calls to SubformState::createForSubform()
BlockForm::form in core/modules/block/src/BlockForm.php
Gets the actual form array to be built.
BlockForm::submitForm in core/modules/block/src/BlockForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form stateā€¦
BlockForm::submitVisibility in core/modules/block/src/BlockForm.php
Helper function to independently submit the visibility UI.
BlockForm::validateForm in core/modules/block/src/BlockForm.php
Form validation handler.
BlockForm::validateVisibility in core/modules/block/src/BlockForm.php
Helper function to independently validate the visibility UI.

... See full list

File

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

Class

SubformState
Stores information about the state of a subform.

Namespace

Drupal\Core\Form

Code

public static function createForSubform(array &$subform, array &$parent_form, FormStateInterface $parent_form_state) {
    return new static($subform, $parent_form, $parent_form_state);
}

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