You are here

abstract protected function AddFormBase::buildInputElement in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media_library/src/Form/AddFormBase.php \Drupal\media_library\Form\AddFormBase::buildInputElement()
  2. 10 core/modules/media_library/src/Form/AddFormBase.php \Drupal\media_library\Form\AddFormBase::buildInputElement()

Builds the element for submitting source field value(s).

The input element needs to have a submit handler to create media items from the user input and store them in the form state using ::processInputValues().

Parameters

array $form: The complete form.

\Drupal\Core\Form\FormStateInterface $form_state: The current form state.

Return value

array The complete form, with the element added.

See also

::processInputValues()

1 call to AddFormBase::buildInputElement()
AddFormBase::buildForm in core/modules/media_library/src/Form/AddFormBase.php
Form constructor.
3 methods override AddFormBase::buildInputElement()
FileUploadForm::buildInputElement in core/modules/media_library/src/Form/FileUploadForm.php
Builds the element for submitting source field value(s).
OEmbedForm::buildInputElement in core/modules/media_library/src/Form/OEmbedForm.php
Builds the element for submitting source field value(s).
TestAddForm::buildInputElement in core/modules/media_library/tests/modules/media_library_form_overwrite_test/src/Form/TestAddForm.php
Builds the element for submitting source field value(s).

File

core/modules/media_library/src/Form/AddFormBase.php, line 238

Class

AddFormBase
Provides a base class for creating media items from within the media library.

Namespace

Drupal\media_library\Form

Code

protected abstract function buildInputElement(array $form, FormStateInterface $form_state);