You are here

public function Webform::formStateToSubmission in Little helpers 7

Same name and namespace in other branches
  1. 7.2 src/Webform/Webform.php \Drupal\little_helpers\Webform\Webform::formStateToSubmission()

Create a submission-object from a webform_client_form $form_state.

This is basically a copy & paste from webform_client_form_submit().

File

src/Webform/Webform.php, line 135

Class

Webform

Namespace

Drupal\little_helpers\Webform

Code

public function formStateToSubmission(&$form_state) {
  if (self::is_webform4()) {
    return $this
      ->w4_formStateToSubmission($form_state);
  }
  else {
    return $this
      ->w3_formStateToSubmission($form_state);
  }
}