function FileWidget::settingsForm
Same name in other branches
- 9 core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php \Drupal\file\Plugin\Field\FieldWidget\FileWidget::settingsForm()
- 10 core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php \Drupal\file\Plugin\Field\FieldWidget\FileWidget::settingsForm()
- 11.x core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php \Drupal\file\Plugin\Field\FieldWidget\FileWidget::settingsForm()
Overrides WidgetBase::settingsForm
1 call to FileWidget::settingsForm()
- ImageWidget::settingsForm in core/
modules/ image/ src/ Plugin/ Field/ FieldWidget/ ImageWidget.php - Returns a form to configure settings for the widget.
1 method overrides FileWidget::settingsForm()
- ImageWidget::settingsForm in core/
modules/ image/ src/ Plugin/ Field/ FieldWidget/ ImageWidget.php - Returns a form to configure settings for the widget.
File
-
core/
modules/ file/ src/ Plugin/ Field/ FieldWidget/ FileWidget.php, line 59
Class
- FileWidget
- Plugin implementation of the 'file_generic' widget.
Namespace
Drupal\file\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element['progress_indicator'] = [
'#type' => 'radios',
'#title' => t('Progress indicator'),
'#options' => [
'throbber' => t('Throbber'),
'bar' => t('Bar with progress meter'),
],
'#default_value' => $this->getSetting('progress_indicator'),
'#description' => t('The throbber display does not show the status of uploads but takes up less space. The progress bar is helpful for monitoring progress on large uploads.'),
'#weight' => 16,
'#access' => file_progress_implementation(),
];
return $element;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.