function FileUriFormatter::settingsForm
Same name in other branches
- 9 core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileUriFormatter::settingsForm()
- 10 core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileUriFormatter::settingsForm()
- 11.x core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php \Drupal\file\Plugin\Field\FieldFormatter\FileUriFormatter::settingsForm()
Overrides BaseFieldFileFormatterBase::settingsForm
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FileUriFormatter.php, line 36
Class
- FileUriFormatter
- Formatter to render the file URI to its download path.
Namespace
Drupal\file\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$form = parent::settingsForm($form, $form_state);
$form['file_download_path'] = [
'#title' => $this->t('Display the file download URI'),
'#type' => 'checkbox',
'#default_value' => $this->getSetting('file_download_path'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.