You are here

public static function PaymentGatewayForm::updateValue in Commerce Core 8.2

Updates the form state value after the inline form is submitted.

Parameters

array $element: The form element.

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

File

modules/payment/src/Element/PaymentGatewayForm.php, line 105

Class

PaymentGatewayForm
Provides a form element for embedding the payment gateway forms.

Namespace

Drupal\commerce_payment\Element

Code

public static function updateValue(array &$element, FormStateInterface $form_state) {

  /** @var \Drupal\commerce\Plugin\Commerce\InlineForm\EntityInlineFormInterface $inline_form */
  $inline_form = $element['#inline_form'];
  $form_state
    ->setValueForElement($element, $inline_form
    ->getEntity());
}