You are here

public function MailchimpEcommerceSync::buildForm in Mailchimp E-Commerce 8

Form constructor.

Parameters

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

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

Return value

array The form structure.

Overrides FormInterface::buildForm

2 calls to MailchimpEcommerceSync::buildForm()
MailchimpEcommerceCommerceSync::buildForm in modules/mailchimp_ecommerce_commerce/src/Form/MailchimpEcommerceCommerceSync.php
Form constructor.
MailchimpEcommerceUbercartSync::buildForm in modules/mailchimp_ecommerce_ubercart/src/Form/MailchimpEcommerceUbercartSync.php
Form constructor.
2 methods override MailchimpEcommerceSync::buildForm()
MailchimpEcommerceCommerceSync::buildForm in modules/mailchimp_ecommerce_commerce/src/Form/MailchimpEcommerceCommerceSync.php
Form constructor.
MailchimpEcommerceUbercartSync::buildForm in modules/mailchimp_ecommerce_ubercart/src/Form/MailchimpEcommerceUbercartSync.php
Form constructor.

File

src/Form/MailchimpEcommerceSync.php, line 20

Class

MailchimpEcommerceSync

Namespace

Drupal\mailchimp_ecommerce\Form

Code

public function buildForm(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
  $form['sync_products'] = [
    '#type' => 'checkbox',
    '#title' => t('Sync Products'),
    '#description' => t('Sync all existing products to Mailchimp.'),
  ];
  $form['actions']['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Sync with Mailchimp'),
    '#button_type' => 'primary',
  ];
  return $form;
}