You are here

public function AvatarKitCommonService::submitConfigurationForm in Avatar Kit 8.2

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 AvatarKitServiceBase::submitConfigurationForm

File

src/Plugin/Avatars/Service/AvatarKitCommonService.php, line 162

Class

AvatarKitCommonService
Automatically creates services based on plugins from Avatar Kit library.

Namespace

Drupal\avatars\Plugin\Avatars\Service

Code

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