public function WatermarkImageEffect::submitConfigurationForm in Image Effects 8
Same name and namespace in other branches
- 8.3 src/Plugin/ImageEffect/WatermarkImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\WatermarkImageEffect::submitConfigurationForm()
- 8.2 src/Plugin/ImageEffect/WatermarkImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\WatermarkImageEffect::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
- src/
Plugin/ ImageEffect/ WatermarkImageEffect.php, line 182
Class
- WatermarkImageEffect
- Class WatermarkImageEffect.
Namespace
Drupal\image_effects\Plugin\ImageEffectCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
$this->configuration['watermark_image'] = $form_state
->getValue('watermark_image');
$this->configuration['watermark_width'] = $form_state
->getValue([
'watermark_resize',
'watermark_width',
]);
$this->configuration['watermark_height'] = $form_state
->getValue([
'watermark_resize',
'watermark_height',
]);
$this->configuration['placement'] = $form_state
->getValue('placement');
$this->configuration['x_offset'] = $form_state
->getValue('x_offset');
$this->configuration['y_offset'] = $form_state
->getValue('y_offset');
$this->configuration['opacity'] = $form_state
->getValue('opacity');
}