public function ImageWidget::settingsForm

Overrides \Drupal\file\Plugin\field\widget\FileWidget::settingsForm().

Overrides FileWidget::settingsForm

File

drupal/core/modules/image/lib/Drupal/image/Plugin/field/widget/ImageWidget.php, line 38
Contains \Drupal\image\Plugin\field\widget\ImageWidget.

Class

ImageWidget
Plugin implementation of the 'image_image' widget.

Namespace

Drupal\image\Plugin\field\widget

Code

public function settingsForm(array $form, array &$form_state) {
  $element = parent::settingsForm($form, $form_state);
  $element['preview_image_style'] = array(
    '#title' => t('Preview image style'),
    '#type' => 'select',
    '#options' => image_style_options(FALSE),
    '#empty_option' => '<' . t('no preview') . '>',
    '#default_value' => $this
      ->getSetting('preview_image_style'),
    '#description' => t('The preview image will be shown while editing the content.'),
    '#weight' => 15,
  );
  return $element;
}