You are here

protected function FeedTypeForm::createSubFormState in Feeds 8.3

Creates a FormStateInterface object for a plugin.

Parameters

string|array $key: The form state key.

\Drupal\Core\Form\FormStateInterface $form_state: The form state to copy values from.

Return value

\Drupal\Core\Form\FormStateInterface A new form state object.

See also

FormStateInterface::getValue()

3 calls to FeedTypeForm::createSubFormState()
FeedTypeForm::form in src/FeedTypeForm.php
Gets the actual form array to be built.
FeedTypeForm::submitForm in src/FeedTypeForm.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…
FeedTypeForm::validateForm in src/FeedTypeForm.php
Form validation handler.

File

src/FeedTypeForm.php, line 412

Class

FeedTypeForm
Form controller for the feed type edit forms.

Namespace

Drupal\feeds

Code

protected function createSubFormState($key, FormStateInterface $form_state) {

  // There might turn out to be other things that need to be copied and passed
  // into plugins. This works for now.
  return (new FormState())
    ->setValues($form_state
    ->getValue($key, []));
}