You are here

public function InlineEntityFormMediaWidget::buildConfigurationForm in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php \Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\InlineEntityFormMediaWidget::buildConfigurationForm()

Overrides MediaEntityDropzoneJsEbWidget::buildConfigurationForm

File

modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php, line 263

Class

InlineEntityFormMediaWidget
Provides an Entity Browser widget that uploads and edit new files.

Namespace

Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildConfigurationForm($form, $form_state);
  $form['form_mode'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Form mode'),
    '#options' => $this->entityDisplayRepository
      ->getFormModeOptions('media'),
    '#default_value' => $this->configuration['form_mode'],
  ];
  return $form;
}