You are here

public function BillingInformation::submitPaneForm in Commerce Core 8.2

Handles the submission of an pane form.

Parameters

array $pane_form: The pane form.

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

array $complete_form: The complete form structure.

Overrides CheckoutPaneBase::submitPaneForm

File

modules/checkout/src/Plugin/Commerce/CheckoutPane/BillingInformation.php, line 110

Class

BillingInformation
Provides the billing information pane.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane

Code

public function submitPaneForm(array &$pane_form, FormStateInterface $form_state, array &$complete_form) {

  /** @var \Drupal\commerce\Plugin\Commerce\InlineForm\EntityInlineFormInterface $inline_form */
  $inline_form = $pane_form['profile']['#inline_form'];

  /** @var \Drupal\profile\Entity\ProfileInterface $profile */
  $profile = $inline_form
    ->getEntity();
  $this->order
    ->setBillingProfile($profile);
}