function ImageWidget::settingsForm
Overrides FileWidget::settingsForm
File
- 
              core/modules/ image/ src/ Plugin/ Field/ FieldWidget/ ImageWidget.php, line 69 
Class
- ImageWidget
- Plugin implementation of the 'image_image' widget.
Namespace
Drupal\image\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
  $element = parent::settingsForm($form, $form_state);
  $element['preview_image_style'] = [
    '#title' => $this->t('Preview image style'),
    '#type' => 'select',
    '#options' => image_style_options(FALSE),
    '#empty_option' => '<' . $this->t('no preview') . '>',
    '#default_value' => $this->getSetting('preview_image_style'),
    '#description' => $this->t('The preview image will be shown while editing the content.'),
    '#weight' => 15,
  ];
  return $element;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
