You are here

public function EmbedTypeBase::submitConfigurationForm in Embed 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 PluginFormInterface::submitConfigurationForm

1 call to EmbedTypeBase::submitConfigurationForm()
Aircraft::submitConfigurationForm in tests/embed_test/src/Plugin/EmbedType/Aircraft.php
Form submission handler.
1 method overrides EmbedTypeBase::submitConfigurationForm()
Aircraft::submitConfigurationForm in tests/embed_test/src/Plugin/EmbedType/Aircraft.php
Form submission handler.

File

src/EmbedType/EmbedTypeBase.php, line 89

Class

EmbedTypeBase
Defines a base implementation that most embed type plugins will extend.

Namespace

Drupal\embed\EmbedType

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  if (!$form_state
    ->hasAnyErrors()) {
    $this
      ->setConfiguration(array_intersect_key($form_state
      ->getValues(), $this
      ->defaultConfiguration()));
  }
}