You are here

public function FileUpload::buildConfigurationForm in Lightning Media 8

Same name and namespace in other branches
  1. 8.4 src/Plugin/EntityBrowser/Widget/FileUpload.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\FileUpload::buildConfigurationForm()
  2. 8.2 src/Plugin/EntityBrowser/Widget/FileUpload.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\FileUpload::buildConfigurationForm()
  3. 8.3 src/Plugin/EntityBrowser/Widget/FileUpload.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\FileUpload::buildConfigurationForm()

File

src/Plugin/EntityBrowser/Widget/FileUpload.php, line 176

Class

FileUpload
An Entity Browser widget for creating media entities from uploaded files.

Namespace

Drupal\lightning_media\Plugin\EntityBrowser\Widget

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildConfigurationForm($form, $form_state);
  $form['return_file'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Return source file entity'),
    '#default_value' => $this->configuration['return_file'],
    '#description' => $this
      ->t('If checked, the source file(s) of the media entity will be returned from this widget.'),
  ];
  return $form;
}