Implements \Drupal\Core\Form\FormInterface::buildForm().
Overrides ConfirmFormBase::buildForm
public function buildForm(array $form, array &$form_state, ImageStyle $image_style = NULL) {
$this->imageStyle = $image_style;
$replacement_styles = array_diff_key(image_style_options(), array(
$this->imageStyle
->id() => '',
));
$form['replacement'] = array(
'#title' => t('Replacement style'),
'#type' => 'select',
'#options' => $replacement_styles,
'#empty_option' => t('No replacement, just delete'),
);
return parent::buildForm($form, $form_state);
}