You are here

public function AutoAspectEffect::submitConfigurationForm in Thunder 6.0.x

Same name and namespace in other branches
  1. 8.5 modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::submitConfigurationForm()
  2. 8.2 modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::submitConfigurationForm()
  3. 8.3 modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::submitConfigurationForm()
  4. 8.4 modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::submitConfigurationForm()
  5. 6.2.x modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::submitConfigurationForm()
  6. 6.1.x modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::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 ConfigurableImageEffectBase::submitConfigurationForm

File

modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php, line 185

Class

AutoAspectEffect
Resizes an image resource.

Namespace

Drupal\thunder_media\Plugin\ImageEffect

Code

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