function ConvertImageEffect::buildConfigurationForm
Same name in other branches
- 9 core/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php \Drupal\image\Plugin\ImageEffect\ConvertImageEffect::buildConfigurationForm()
- 10 core/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php \Drupal\image\Plugin\ImageEffect\ConvertImageEffect::buildConfigurationForm()
- 11.x core/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php \Drupal\image\Plugin\ImageEffect\ConvertImageEffect::buildConfigurationForm()
File
-
core/
modules/ image/ src/ Plugin/ ImageEffect/ ConvertImageEffect.php, line 62
Class
- ConvertImageEffect
- Converts an image resource.
Namespace
Drupal\image\Plugin\ImageEffectCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$extensions = \Drupal::service('image.toolkit.manager')->getDefaultToolkit()
->getSupportedExtensions();
$options = array_combine($extensions, array_map('mb_strtoupper', $extensions));
$form['extension'] = [
'#type' => 'select',
'#title' => t('Extension'),
'#default_value' => $this->configuration['extension'],
'#required' => TRUE,
'#options' => $options,
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.