public function ContactInformation::buildPaneForm in Commerce Core 8.2
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/
checkout/ src/ Plugin/ Commerce/ CheckoutPane/ ContactInformation.php, line 89
Class
- ContactInformation
- Provides the contact information pane.
Namespace
Drupal\commerce_checkout\Plugin\Commerce\CheckoutPaneCode
public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form) {
$pane_form['email'] = [
'#type' => 'email',
'#title' => $this
->t('Email'),
'#default_value' => $this->order
->getEmail(),
'#required' => TRUE,
];
if ($this->configuration['double_entry']) {
$pane_form['email_confirm'] = [
'#type' => 'email',
'#title' => $this
->t('Confirm email'),
'#default_value' => $this->order
->getEmail(),
'#required' => TRUE,
];
}
return $pane_form;
}