public function AdvDef::buildConfigurationForm in Image Optimize Binaries 8
Overrides ImageAPIOptimizeProcessorBinaryBase::buildConfigurationForm
File
- src/
Plugin/ ImageAPIOptimizeProcessor/ AdvDef.php, line 59
Class
- AdvDef
- Uses the AdvDef 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['recompress'] = array(
'#title' => $this
->t('Recompress'),
'#type' => 'checkbox',
'#default_value' => $this->configuration['recompress'],
);
$form['mode'] = array(
'#title' => $this
->t('Compression mode'),
'#type' => 'select',
'#options' => array(
0 => $this
->t('Disabled'),
1 => $this
->t('Fast'),
2 => $this
->t('Normal'),
3 => $this
->t('Extra'),
4 => $this
->t('Insane'),
),
'#default_value' => $this->configuration['mode'],
);
return $form;
}