You are here

public function ContextMetadata::submitConfigurationForm in Context Metadata 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ContextReaction/ContextMetadata.php \Drupal\context_metadata\Plugin\ContextReaction\ContextMetadata::submitConfigurationForm()

File

src/Plugin/ContextReaction/ContextMetadata.php, line 78

Class

ContextMetadata
Provides a content reaction that adds a Metadata.

Namespace

Drupal\context_metadata\Plugin\ContextReaction

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this
    ->setConfiguration([
    'metadata_title' => $form_state
      ->getValue('metadata_title'),
    'metadata_description' => $form_state
      ->getValue('metadata_description'),
    'metadata_keywords' => $form_state
      ->getValue('metadata_keywords'),
    'metadata_canonical_url' => $form_state
      ->getValue('metadata_canonical_url'),
  ]);
}