You are here

public function CreateTemplateForm::submitForm in GatherContent 8.5

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

gathercontent_upload_ui/src/Form/CreateTemplateForm.php, line 134

Class

CreateTemplateForm

Namespace

Drupal\gathercontent_upload_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->mappingCreator
    ->generateMapping($form_state
    ->getValue('entity_type'), $form_state
    ->getValue('content_type'), $form_state
    ->getValue('project_id'));
  $this
    ->messenger()
    ->addMessage('Mapping created successfully');
}