You are here

public function File::buildConfigurationForm in Feeds 8.3

@todo Inject $user.

Overrides EntityReference::buildConfigurationForm

File

src/Feeds/Target/File.php, line 292

Class

File
Defines a file field mapper.

Namespace

Drupal\feeds\Feeds\Target

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildConfigurationForm($form, $form_state);
  $options = [
    FileSystemInterface::EXISTS_REPLACE => $this
      ->t('Replace'),
    FileSystemInterface::EXISTS_RENAME => $this
      ->t('Rename'),
    FileSystemInterface::EXISTS_ERROR => $this
      ->t('Ignore'),
  ];
  $form['existing'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Handle existing files'),
    '#options' => $options,
    '#default_value' => $this->configuration['existing'],
  ];
  return $form;
}