You are here

protected function SynonymForm::getSubFormState in Synonyms 8

Same name and namespace in other branches
  1. 2.0.x src/Form/SynonymForm.php \Drupal\synonyms\Form\SynonymForm::getSubFormState()

Supportive method to create sub-form-states.

Parameters

string $element_name: Name of the nested form element for which to create a sub form state.

array $form: Full form array.

\Drupal\Core\Form\FormStateInterface $form_state: Full form state out of which to create sub form state.

Return value

\Drupal\Core\Form\SubformState Sub form state object generated based on the input arguments

2 calls to SynonymForm::getSubFormState()
SynonymForm::submitForm in src/Form/SynonymForm.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…
SynonymForm::validateForm in src/Form/SynonymForm.php
Form validation handler.

File

src/Form/SynonymForm.php, line 300

Class

SynonymForm
Entity form for 'synonym' config entity type.

Namespace

Drupal\synonyms\Form

Code

protected function getSubFormState($element_name, array $form, FormStateInterface $form_state) {
  return SubformState::createForSubform($form['ajax_wrapper'][$element_name], $form, $form_state);
}