You are here

public function GD::submitConfigurationForm in ImageAPI Optimize GD 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/ImageAPIOptimizeProcessor/GD.php \Drupal\imageapi_optimize_gd\Plugin\ImageAPIOptimizeProcessor\GD::submitConfigurationForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides ConfigurableImageAPIOptimizeProcessorBase::submitConfigurationForm

File

src/Plugin/ImageAPIOptimizeProcessor/GD.php, line 94

Class

GD
Provides a ImageAPI Optimize processor for GD.

Namespace

Drupal\imageapi_optimize_gd\Plugin\ImageAPIOptimizeProcessor

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::submitConfigurationForm($form, $form_state);
  $this->configuration['quality'] = $form_state
    ->getValue('quality');
  $this->configuration['file_types'] = array_filter($form_state
    ->getValue('file_types'));
}