public function ResizeImageEffect::buildConfigurationForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/image/src/Plugin/ImageEffect/ResizeImageEffect.php \Drupal\image\Plugin\ImageEffect\ResizeImageEffect::buildConfigurationForm()
- 9 core/modules/image/src/Plugin/ImageEffect/ResizeImageEffect.php \Drupal\image\Plugin\ImageEffect\ResizeImageEffect::buildConfigurationForm()
File
- core/
modules/ image/ src/ Plugin/ ImageEffect/ ResizeImageEffect.php, line 66
Class
- ResizeImageEffect
- Resizes an image resource.
Namespace
Drupal\image\Plugin\ImageEffectCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['width'] = [
'#type' => 'number',
'#title' => t('Width'),
'#default_value' => $this->configuration['width'],
'#field_suffix' => ' ' . t('pixels'),
'#required' => TRUE,
'#min' => 1,
];
$form['height'] = [
'#type' => 'number',
'#title' => t('Height'),
'#default_value' => $this->configuration['height'],
'#field_suffix' => ' ' . t('pixels'),
'#required' => TRUE,
'#min' => 1,
];
return $form;
}