public function OptiPng::buildConfigurationForm in Image Optimize Binaries 8
Overrides ImageAPIOptimizeProcessorBinaryBase::buildConfigurationForm
File
- src/
Plugin/ ImageAPIOptimizeProcessor/ OptiPng.php, line 60
Class
- OptiPng
- Uses the OptiPng binary to optimize images.
Namespace
Drupal\imageapi_optimize_binaries\Plugin\ImageAPIOptimizeProcessorCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$form['level'] = array(
'#title' => t('Optimization level'),
'#type' => 'select',
'#options' => range(0, 7),
'#default_value' => $this->configuration['level'],
);
$form['interlace'] = array(
'#title' => $this
->t('Interlace'),
'#type' => 'select',
'#options' => array(
'' => $this
->t('No change'),
0 => $this
->t('Non-interlaced'),
1 => $this
->t('Interlaced'),
),
'#default_value' => $this->configuration['interlace'],
'#description' => t('If "No change" is select, the output will have the same interlace type as the input.'),
);
return $form;
}