public function AddWatermarkEffect::submitConfigurationForm in Basic Watermark 8
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
- src/
Plugin/ ImageEffect/ AddWatermarkEffect.php, line 212
Class
- AddWatermarkEffect
- Converts an image resource.
Namespace
Drupal\basic_watermark\Plugin\ImageEffectCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
$this->configuration['watermark_path'] = $form_state
->getValue('watermark_path');
$this->configuration['apply_type'] = $form_state
->getValue('apply_type');
$this->configuration['position'] = $form_state
->getValue('position_wrapper')['position'];
$this->configuration['margins'] = $form_state
->getValue('margins');
if ($this->configuration['apply_type'] == 'repeat') {
$this->configuration['position'] = 'left-top';
}
}