public function OrderSummary::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/ OrderSummary.php, line 100
Class
- OrderSummary
- Provides the Order summary pane.
Namespace
Drupal\commerce_checkout\Plugin\Commerce\CheckoutPaneCode
public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form) {
if ($this->configuration['view']) {
$pane_form['summary'] = [
'#type' => 'view',
'#name' => $this->configuration['view'],
'#display_id' => 'default',
'#arguments' => [
$this->order
->id(),
],
'#embed' => TRUE,
];
}
else {
$pane_form['summary'] = [
'#theme' => 'commerce_checkout_order_summary',
'#order_entity' => $this->order,
'#checkout_step' => $complete_form['#step_id'],
];
}
return $pane_form;
}