You are here

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

Same name and namespace in other branches
  1. 8 src/Plugin/ImageAPIOptimizeProcessor/WebP.php \Drupal\imageapi_optimize_webp\Plugin\ImageAPIOptimizeProcessor\WebP::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/WebP.php, line 64

Class

WebP
Plugin annotation @ImageAPIOptimizeProcessor( id = "imageapi_optimize_webp", label = @Translation("WebP Deriver"), description = @Translation("Clone image to WebP") )

Namespace

Drupal\imageapi_optimize_webp\Plugin\ImageAPIOptimizeProcessor

Code

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