You are here

public function ContactSubscription::buildPaneForm in Mailchimp E-Commerce 8

Builds the pane form.

Parameters

array $pane_form: The pane form, containing the following basic properties:

  • #parents: Identifies the position of the pane form in the overall parent form, and identifies the location where the field values are placed within $form_state->getValues().

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

array $complete_form: The complete form structure.

Overrides CheckoutPaneInterface::buildPaneForm

File

modules/mailchimp_ecommerce_commerce/src/Plugin/Commerce/CheckoutPane/ContactSubscription.php, line 150

Class

ContactSubscription
Provides the subscription information pane.

Namespace

Drupal\mailchimp_ecommerce_commerce\Plugin\Commerce\CheckoutPane

Code

public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form) {
  $pane_form['subscription'] = [
    '#type' => 'checkbox',
    '#title' => $this->configuration['label'],
    '#default_value' => '',
    '#required' => FALSE,
  ];
  return $pane_form;
}