You are here

protected function MediaTypeForm::getSourceSubFormState in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/src/MediaTypeForm.php \Drupal\media\MediaTypeForm::getSourceSubFormState()

Gets subform state for the media source configuration subform.

Parameters

array $form: Full form array.

\Drupal\Core\Form\FormStateInterface $form_state: Parent form state.

Return value

\Drupal\Core\Form\SubformStateInterface Sub-form state for the media source configuration form.

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

File

core/modules/media/src/MediaTypeForm.php, line 273

Class

MediaTypeForm
Form controller for media type forms.

Namespace

Drupal\media

Code

protected function getSourceSubFormState(array $form, FormStateInterface $form_state) {
  return SubformState::createForSubform($form['source_dependent']['source_configuration'], $form, $form_state)
    ->set('operation', $this->operation)
    ->set('type', $this->entity);
}